lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 19 Jan 2012 18:58:02 +0100 From: Linus Walleij <linus.walleij@...aro.org> To: "Kim, Milo" <Milo.Kim@...com> Cc: "shreshthakumar.sahu@...ricsson.com" <shreshthakumar.sahu@...ricsson.com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "D.Murphy@...orola.com" <D.Murphy@...orola.com>, "rpurdie@...ys.net" <rpurdie@...ys.net> Subject: Re: [PATCH] leds-lm3530: support pwm input mode and add platform data On Thu, Jan 19, 2012 at 5:36 AM, Kim, Milo <Milo.Kim@...com> wrote: > (a) support pwm control mode > (1) add 'struct lm3530_pwm_data' in the platform data > The pwm data is the platform specific functions which generate the pwm. > The pwm data is only valid when brightness is pwm input mode. > Functions should be implemented by the pwm driver. > pwm_set_intensity() : set duty of pwm. > pwm_get_intensity() : get current duty of pwm. > > (2) brightness control by pwm > If the control mode is pwm, then brightness is changed by the duty of pwm. > So pwm platform function should be called in lm3530_brightness_set(). > > (3) do not update brightness register when pwm input mode > In pwm input mode, brightness register is not used. > If any value is updated in this register, then the led will be off. > > (b) add 'name' in the lm3530_platform_data > : The led device name can be configurable. > For the compatibility, the name is set to default value(LM3530_LED_DEV) > when 'name' is not defined. > > (c) add 'is_vin_always_on' in the lm3530_platform_data > : The 'IN' pin(Input voltage connection) can be always turned on > in case it is connected with VBATT. > To support this case, 'is_vin_always_on' is added. > If VIN is always on, then we don't need to control the regulator for IN pin. > > (d) add 'lm3530_mode_get()' in the lm3530 device attribute > : To get information about brightness control mode. > > (e) use 'struct led_classdev' rather than 'struct i2c_client' > to get members of lm3530_data > : in lm3530_mode_set() > > (f) use 'pdata' rather than 'pltfm' in lm3530_init_registers() > > (g) for less arithmetic operation, replace 'divide-by-2' with > 'shift-right-by 1 bit' > : in lm3530_brightness_set() Very nice patch, but please split it into one patch per subject (a) through (g) as per Documentation/SubmittingPatches, this makes it easier to review and git bisect. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists