Re: [PATCH] staging: tsl2x7x: Moved contents of the header to the source file.
Hi Arushi, [auto build test ERROR on iio/togreg] [also build test ERROR on v4.11-rc3 next-20170324] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Arushi-Singhal/staging-tsl2x7x-Moved-contents-of-the-header-to-the-source-file/20170325-152616 base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg config: x86_64-randconfig-x004-201712 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): In file included from drivers/staging/iio/light/tsl2x7x_core.c:33:0: >> drivers/staging/iio/light/tsl2x7x.h:39:40: error: >> 'TSL2X7X_MAX_LUX_TABLE_SIZE' undeclared here (not in a function) struct tsl2x7x_lux platform_lux_table[TSL2X7X_MAX_LUX_TABLE_SIZE]; ^~ vim +/TSL2X7X_MAX_LUX_TABLE_SIZE +39 drivers/staging/iio/light/tsl2x7x.h 3c97c08b Jon Brenner 2012-04-24 33 * 3c97c08b Jon Brenner 2012-04-24 34 */ 3c97c08b Jon Brenner 2012-04-24 35 struct tsl2X7X_platform_data { 3c97c08b Jon Brenner 2012-04-24 36 int (*platform_power)(struct device *dev, pm_message_t); 3c97c08b Jon Brenner 2012-04-24 37 int (*power_on)(struct iio_dev *indio_dev); 3c97c08b Jon Brenner 2012-04-24 38 int (*power_off)(struct i2c_client *dev); 3c97c08b Jon Brenner 2012-04-24 @39 struct tsl2x7x_lux platform_lux_table[TSL2X7X_MAX_LUX_TABLE_SIZE]; 3c97c08b Jon Brenner 2012-04-24 40 struct tsl2x7x_settings *platform_default_settings; 3c97c08b Jon Brenner 2012-04-24 41 }; 3c97c08b Jon Brenner 2012-04-24 42 :: The code at line 39 was first introduced by commit :: 3c97c08b5735ac05ebc0cbd0aa7722393f50b846 staging: iio: add TAOS tsl2x7x driver :: TO: Jon Brenner:: CC: Greg Kroah-Hartman --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH] staging: tsl2x7x: Moved contents of the header to the source file.
Hi Arushi, [auto build test ERROR on iio/togreg] [also build test ERROR on v4.11-rc3 next-20170324] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Arushi-Singhal/staging-tsl2x7x-Moved-contents-of-the-header-to-the-source-file/20170325-152616 base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg config: x86_64-randconfig-x004-201712 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): In file included from drivers/staging/iio/light/tsl2x7x_core.c:33:0: >> drivers/staging/iio/light/tsl2x7x.h:39:40: error: >> 'TSL2X7X_MAX_LUX_TABLE_SIZE' undeclared here (not in a function) struct tsl2x7x_lux platform_lux_table[TSL2X7X_MAX_LUX_TABLE_SIZE]; ^~ vim +/TSL2X7X_MAX_LUX_TABLE_SIZE +39 drivers/staging/iio/light/tsl2x7x.h 3c97c08b Jon Brenner 2012-04-24 33 * 3c97c08b Jon Brenner 2012-04-24 34 */ 3c97c08b Jon Brenner 2012-04-24 35 struct tsl2X7X_platform_data { 3c97c08b Jon Brenner 2012-04-24 36 int (*platform_power)(struct device *dev, pm_message_t); 3c97c08b Jon Brenner 2012-04-24 37 int (*power_on)(struct iio_dev *indio_dev); 3c97c08b Jon Brenner 2012-04-24 38 int (*power_off)(struct i2c_client *dev); 3c97c08b Jon Brenner 2012-04-24 @39 struct tsl2x7x_lux platform_lux_table[TSL2X7X_MAX_LUX_TABLE_SIZE]; 3c97c08b Jon Brenner 2012-04-24 40 struct tsl2x7x_settings *platform_default_settings; 3c97c08b Jon Brenner 2012-04-24 41 }; 3c97c08b Jon Brenner 2012-04-24 42 :: The code at line 39 was first introduced by commit :: 3c97c08b5735ac05ebc0cbd0aa7722393f50b846 staging: iio: add TAOS tsl2x7x driver :: TO: Jon Brenner :: CC: Greg Kroah-Hartman --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH] staging: tsl2x7x: Moved contents of the header to the source file.
On 03/23/2017 12:53 PM, Arushi Singhal wrote: > Moved the contents of the header(tsl2x7x.h) into the source file > tsl2x7x_core.c with the exception of the platform data struct which is > supposed to be used from somewhere else other than the driver. The platform_data struct uses the other structs though.
Re: [PATCH] staging: tsl2x7x: Moved contents of the header to the source file.
On 03/23/2017 12:53 PM, Arushi Singhal wrote: > Moved the contents of the header(tsl2x7x.h) into the source file > tsl2x7x_core.c with the exception of the platform data struct which is > supposed to be used from somewhere else other than the driver. The platform_data struct uses the other structs though.
[PATCH] staging: tsl2x7x: Moved contents of the header to the source file.
Moved the contents of the header(tsl2x7x.h) into the source file tsl2x7x_core.c with the exception of the platform data struct which is supposed to be used from somewhere else other than the driver. Signed-off-by: Arushi Singhal--- drivers/staging/iio/light/tsl2x7x.h | 57 --- drivers/staging/iio/light/tsl2x7x_core.c | 58 2 files changed, 58 insertions(+), 57 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.h b/drivers/staging/iio/light/tsl2x7x.h index ecae92211216..7b71003ddb33 100644 --- a/drivers/staging/iio/light/tsl2x7x.h +++ b/drivers/staging/iio/light/tsl2x7x.h @@ -23,63 +23,6 @@ #define __TSL2X7X_H #include -/* Max number of segments allowable in LUX table */ -#define TSL2X7X_MAX_LUX_TABLE_SIZE 9 -#define MAX_DEFAULT_TABLE_BYTES (sizeof(int) * TSL2X7X_MAX_LUX_TABLE_SIZE) - -struct iio_dev; - -struct tsl2x7x_lux { - unsigned int ratio; - unsigned int ch0; - unsigned int ch1; -}; - -/** - * struct tsl2x7x_default_settings - power on defaults unless - * overridden by platform data. - * @als_time: ALS Integration time - multiple of 50mS - * @als_gain: Index into the ALS gain table. - * @als_gain_trim: default gain trim to account for - * aperture effects. - * @wait_time: Time between PRX and ALS cycles - * in 2.7 periods - * @prx_time: 5.2ms prox integration time - - * decrease in 2.7ms periods - * @prx_gain: Proximity gain index - * @prox_config: Prox configuration filters. - * @als_cal_target:Known external ALS reading for - * calibration. - * @interrupts_en: Enable/Disable - 0x00 = none, 0x10 = als, - * 0x20 = prx, 0x30 = bth - * @persistence: H/W Filters, Number of 'out of limits' - * ADC readings PRX/ALS. - * @als_thresh_low:CH0 'low' count to trigger interrupt. - * @als_thresh_high: CH0 'high' count to trigger interrupt. - * @prox_thres_low:Low threshold proximity detection. - * @prox_thres_high: High threshold proximity detection - * @prox_pulse_count: Number if proximity emitter pulses - * @prox_max_samples_cal: Used for prox cal. - */ -struct tsl2x7x_settings { - int als_time; - int als_gain; - int als_gain_trim; - int wait_time; - int prx_time; - int prox_gain; - int prox_config; - int als_cal_target; - u8 interrupts_en; - u8 persistence; - int als_thresh_low; - int als_thresh_high; - int prox_thres_low; - int prox_thres_high; - int prox_pulse_count; - int prox_max_samples_cal; -}; - /** * struct tsl2X7X_platform_data - Platform callback, glass and defaults * @platform_power:Suspend/resume platform callback diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c index ea15bc1c300c..21cbf7e95c4e 100644 --- a/drivers/staging/iio/light/tsl2x7x_core.c +++ b/drivers/staging/iio/light/tsl2x7x_core.c @@ -32,6 +32,64 @@ #include #include "tsl2x7x.h" +/* Max number of segments allowable in LUX table */ +#define TSL2X7X_MAX_LUX_TABLE_SIZE 9 +#define MAX_DEFAULT_TABLE_BYTES (sizeof(int) * TSL2X7X_MAX_LUX_TABLE_SIZE) + +struct iio_dev; + +struct tsl2x7x_lux { + unsigned int ratio; + unsigned int ch0; + unsigned int ch1; +}; + +/** + * struct tsl2x7x_default_settings - power on defaults unless + * overridden by platform data. + * @als_time: ALS Integration time - multiple of 50mS + * @als_gain: Index into the ALS gain table. + * @als_gain_trim: default gain trim to account for + * aperture effects. + * @wait_time: Time between PRX and ALS cycles + * in 2.7 periods + * @prx_time: 5.2ms prox integration time - + * decrease in 2.7ms periods + * @prx_gain: Proximity gain index + * @prox_config: Prox configuration filters. + * @als_cal_target:Known external ALS reading for + * calibration. + * @interrupts_en: Enable/Disable - 0x00 = none, 0x10 = als, + * 0x20 = prx, 0x30 = bth + * @persistence: H/W Filters, Number of 'out of limits' + * ADC readings PRX/ALS. + * @als_thresh_low:CH0 'low' count to trigger interrupt. + * @als_thresh_high: CH0 'high' count to trigger interrupt. + * @prox_thres_low:Low threshold proximity detection. + * @prox_thres_high: High threshold
[PATCH] staging: tsl2x7x: Moved contents of the header to the source file.
Moved the contents of the header(tsl2x7x.h) into the source file tsl2x7x_core.c with the exception of the platform data struct which is supposed to be used from somewhere else other than the driver. Signed-off-by: Arushi Singhal --- drivers/staging/iio/light/tsl2x7x.h | 57 --- drivers/staging/iio/light/tsl2x7x_core.c | 58 2 files changed, 58 insertions(+), 57 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.h b/drivers/staging/iio/light/tsl2x7x.h index ecae92211216..7b71003ddb33 100644 --- a/drivers/staging/iio/light/tsl2x7x.h +++ b/drivers/staging/iio/light/tsl2x7x.h @@ -23,63 +23,6 @@ #define __TSL2X7X_H #include -/* Max number of segments allowable in LUX table */ -#define TSL2X7X_MAX_LUX_TABLE_SIZE 9 -#define MAX_DEFAULT_TABLE_BYTES (sizeof(int) * TSL2X7X_MAX_LUX_TABLE_SIZE) - -struct iio_dev; - -struct tsl2x7x_lux { - unsigned int ratio; - unsigned int ch0; - unsigned int ch1; -}; - -/** - * struct tsl2x7x_default_settings - power on defaults unless - * overridden by platform data. - * @als_time: ALS Integration time - multiple of 50mS - * @als_gain: Index into the ALS gain table. - * @als_gain_trim: default gain trim to account for - * aperture effects. - * @wait_time: Time between PRX and ALS cycles - * in 2.7 periods - * @prx_time: 5.2ms prox integration time - - * decrease in 2.7ms periods - * @prx_gain: Proximity gain index - * @prox_config: Prox configuration filters. - * @als_cal_target:Known external ALS reading for - * calibration. - * @interrupts_en: Enable/Disable - 0x00 = none, 0x10 = als, - * 0x20 = prx, 0x30 = bth - * @persistence: H/W Filters, Number of 'out of limits' - * ADC readings PRX/ALS. - * @als_thresh_low:CH0 'low' count to trigger interrupt. - * @als_thresh_high: CH0 'high' count to trigger interrupt. - * @prox_thres_low:Low threshold proximity detection. - * @prox_thres_high: High threshold proximity detection - * @prox_pulse_count: Number if proximity emitter pulses - * @prox_max_samples_cal: Used for prox cal. - */ -struct tsl2x7x_settings { - int als_time; - int als_gain; - int als_gain_trim; - int wait_time; - int prx_time; - int prox_gain; - int prox_config; - int als_cal_target; - u8 interrupts_en; - u8 persistence; - int als_thresh_low; - int als_thresh_high; - int prox_thres_low; - int prox_thres_high; - int prox_pulse_count; - int prox_max_samples_cal; -}; - /** * struct tsl2X7X_platform_data - Platform callback, glass and defaults * @platform_power:Suspend/resume platform callback diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c index ea15bc1c300c..21cbf7e95c4e 100644 --- a/drivers/staging/iio/light/tsl2x7x_core.c +++ b/drivers/staging/iio/light/tsl2x7x_core.c @@ -32,6 +32,64 @@ #include #include "tsl2x7x.h" +/* Max number of segments allowable in LUX table */ +#define TSL2X7X_MAX_LUX_TABLE_SIZE 9 +#define MAX_DEFAULT_TABLE_BYTES (sizeof(int) * TSL2X7X_MAX_LUX_TABLE_SIZE) + +struct iio_dev; + +struct tsl2x7x_lux { + unsigned int ratio; + unsigned int ch0; + unsigned int ch1; +}; + +/** + * struct tsl2x7x_default_settings - power on defaults unless + * overridden by platform data. + * @als_time: ALS Integration time - multiple of 50mS + * @als_gain: Index into the ALS gain table. + * @als_gain_trim: default gain trim to account for + * aperture effects. + * @wait_time: Time between PRX and ALS cycles + * in 2.7 periods + * @prx_time: 5.2ms prox integration time - + * decrease in 2.7ms periods + * @prx_gain: Proximity gain index + * @prox_config: Prox configuration filters. + * @als_cal_target:Known external ALS reading for + * calibration. + * @interrupts_en: Enable/Disable - 0x00 = none, 0x10 = als, + * 0x20 = prx, 0x30 = bth + * @persistence: H/W Filters, Number of 'out of limits' + * ADC readings PRX/ALS. + * @als_thresh_low:CH0 'low' count to trigger interrupt. + * @als_thresh_high: CH0 'high' count to trigger interrupt. + * @prox_thres_low:Low threshold proximity detection. + * @prox_thres_high: High threshold proximity detection + *