|
@@ -122,24 +122,24 @@ struct afe4404_data {
|
|
|
};
|
|
|
|
|
|
enum afe4404_chan_id {
|
|
|
+ LED2 = 1,
|
|
|
+ ALED2,
|
|
|
LED1,
|
|
|
ALED1,
|
|
|
- LED2,
|
|
|
- ALED2,
|
|
|
- LED1_ALED1,
|
|
|
LED2_ALED2,
|
|
|
+ LED1_ALED1,
|
|
|
ILED1,
|
|
|
ILED2,
|
|
|
ILED3,
|
|
|
};
|
|
|
|
|
|
static const struct afe440x_reg_info afe4404_reg_info[] = {
|
|
|
- [LED1] = AFE440X_REG_INFO(AFE440X_LED1VAL, AFE4404_OFFDAC, AFE4404_OFFDAC_CURR_LED1),
|
|
|
- [ALED1] = AFE440X_REG_INFO(AFE440X_ALED1VAL, AFE4404_OFFDAC, AFE4404_OFFDAC_CURR_ALED1),
|
|
|
[LED2] = AFE440X_REG_INFO(AFE440X_LED2VAL, AFE4404_OFFDAC, AFE4404_OFFDAC_CURR_LED2),
|
|
|
[ALED2] = AFE440X_REG_INFO(AFE440X_ALED2VAL, AFE4404_OFFDAC, AFE4404_OFFDAC_CURR_ALED2),
|
|
|
- [LED1_ALED1] = AFE440X_REG_INFO(AFE440X_LED1_ALED1VAL, 0, NULL),
|
|
|
+ [LED1] = AFE440X_REG_INFO(AFE440X_LED1VAL, AFE4404_OFFDAC, AFE4404_OFFDAC_CURR_LED1),
|
|
|
+ [ALED1] = AFE440X_REG_INFO(AFE440X_ALED1VAL, AFE4404_OFFDAC, AFE4404_OFFDAC_CURR_ALED1),
|
|
|
[LED2_ALED2] = AFE440X_REG_INFO(AFE440X_LED2_ALED2VAL, 0, NULL),
|
|
|
+ [LED1_ALED1] = AFE440X_REG_INFO(AFE440X_LED1_ALED1VAL, 0, NULL),
|
|
|
[ILED1] = AFE440X_REG_INFO(AFE440X_LEDCNTRL, 0, AFE4404_LEDCNTRL_ILED1),
|
|
|
[ILED2] = AFE440X_REG_INFO(AFE440X_LEDCNTRL, 0, AFE4404_LEDCNTRL_ILED2),
|
|
|
[ILED3] = AFE440X_REG_INFO(AFE440X_LEDCNTRL, 0, AFE4404_LEDCNTRL_ILED3),
|
|
@@ -147,16 +147,16 @@ static const struct afe440x_reg_info afe4404_reg_info[] = {
|
|
|
|
|
|
static const struct iio_chan_spec afe4404_channels[] = {
|
|
|
/* ADC values */
|
|
|
- AFE440X_INTENSITY_CHAN(LED1, "led1", BIT(IIO_CHAN_INFO_OFFSET)),
|
|
|
- AFE440X_INTENSITY_CHAN(ALED1, "led1_ambient", BIT(IIO_CHAN_INFO_OFFSET)),
|
|
|
- AFE440X_INTENSITY_CHAN(LED2, "led2", BIT(IIO_CHAN_INFO_OFFSET)),
|
|
|
- AFE440X_INTENSITY_CHAN(ALED2, "led2_ambient", BIT(IIO_CHAN_INFO_OFFSET)),
|
|
|
- AFE440X_INTENSITY_CHAN(LED1_ALED1, "led1-led1_ambient", 0),
|
|
|
- AFE440X_INTENSITY_CHAN(LED2_ALED2, "led2-led2_ambient", 0),
|
|
|
+ AFE440X_INTENSITY_CHAN(LED2, BIT(IIO_CHAN_INFO_OFFSET)),
|
|
|
+ AFE440X_INTENSITY_CHAN(ALED2, BIT(IIO_CHAN_INFO_OFFSET)),
|
|
|
+ AFE440X_INTENSITY_CHAN(LED1, BIT(IIO_CHAN_INFO_OFFSET)),
|
|
|
+ AFE440X_INTENSITY_CHAN(ALED1, BIT(IIO_CHAN_INFO_OFFSET)),
|
|
|
+ AFE440X_INTENSITY_CHAN(LED2_ALED2, 0),
|
|
|
+ AFE440X_INTENSITY_CHAN(LED1_ALED1, 0),
|
|
|
/* LED current */
|
|
|
- AFE440X_CURRENT_CHAN(ILED1, "led1"),
|
|
|
- AFE440X_CURRENT_CHAN(ILED2, "led2"),
|
|
|
- AFE440X_CURRENT_CHAN(ILED3, "led3"),
|
|
|
+ AFE440X_CURRENT_CHAN(ILED1),
|
|
|
+ AFE440X_CURRENT_CHAN(ILED2),
|
|
|
+ AFE440X_CURRENT_CHAN(ILED3),
|
|
|
};
|
|
|
|
|
|
static const struct afe440x_val_table afe4404_res_table[] = {
|