28 Aug, 2015
1 commit
-
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Jacek Anaszewski
26 Jun, 2014
1 commit
-
Use the attribute groups of the led-class to create the mode attribute
during probe in order to avoid racing with userspace.Signed-off-by: Johan Hovold
Signed-off-by: Bryan Wu
27 Aug, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Bryan Wu
02 Feb, 2013
1 commit
-
Add lm3530_led_enable() and lm3530_led_disable() helper functions.
This ensures setting drvdata->enable to correct status if regulator_disable
fails.Signed-off-by: Axel Lin
Acked-by: Shreshtha Kumar SAHU
Acked-by: Milo Kim
Tested-by: Milo Kim
Signed-off-by: Bryan Wu
29 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Richard Purdie
Cc: Jan-Simon Moeller
Acked-by: Bryan Wu
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Richard Purdie
Cc: Jan-Simon Moeller
Acked-by: Bryan Wu
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Richard Purdie
Cc: Jan-Simon Moeller
Acked-by: Bryan Wu
Signed-off-by: Greg Kroah-Hartman
12 Sep, 2012
2 commits
-
Fixes the following smatch warnings:
drivers/leds/leds-lm3530.c:361 lm3530_mode_set() info:
why not propagate 'mode' from lm3530_get_mode_from_str() instead of -22?
drivers/leds/leds-lm3530.c:432 lm3530_probe() info:
why not propagate 'err' from lm3530_init_registers() instead of -19?
drivers/leds/leds-lm3530.c:438 lm3530_probe() info:
why not propagate 'err' from led_classdev_register() instead of -19?Reported-by: Fengguang Wu
Cc: Shreshtha Kumar SAHU
Signed-off-by: Sachin Kamat
Signed-off-by: Bryan Wu -
Device managed functions are already used in this file.
Hence convert regulator_get() too to use it.Signed-off-by: Sachin Kamat
Signed-off-by: Bryan Wu
24 Jul, 2012
1 commit
-
Cc: Shreshtha Kumar SAHU
Acked-by: Linus Walleij
Signed-off-by: Bryan Wu
30 May, 2012
1 commit
-
For better code readability, ALS code is moved to new a function -
lm3530_als_configure()Signed-off-by: Milo(Woogyom) Kim
Acked-by: Linus Walleij
Cc: Shreshtha Kumar SAHU
Cc: Richard Purdie
Cc: Bryan Wu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Mar, 2012
6 commits
-
Improve the readability by moving the code setting gen_config to one
place.[akpm@linux-foundation.org: fix some patch skew]
Signed-off-by: Axel Lin
Cc: Shreshtha Kumar Sahu
Cc: "Milo(Woogyom) Kim"
Cc: Richard Purdie
Acked-by: Linus Walleij
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use 'pdata' rather than 'pltfm' in lm3530_init_registers().
Signed-off-by: Milo(Woogyom) Kim
Cc: Linus Walleij
Cc: Richard Purdie
Cc: Axel Lin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
LM3530_ALS_ZONE_REG is read-only register.
Writing this register is not necessary.Signed-off-by: Milo(Woogyom) Kim
Cc: Linus Walleij
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
* 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 the brightness.* 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().* 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.* when input mode is changed, set duty of pwm to 0 if unnecessary.
Signed-off-by: Milo(Woogyom) Kim
Cc: Linus Walleij
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
To get members of lm3530_data, use 'struct led_classdev' rather than
'struct i2c_client'.[akpm@linux-foundation.org: fix 80-column fixes more nicely]
Signed-off-by: Milo(Woogyom) Kim
Cc: Linus Walleij
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Only 7 bits are used for updating the brightness. (register address :
A0h) So the max_brightness property of lm3530 should be set to 127.On initializing registers, maximum initial brightness is limited to
'max_brightness'.Division-by-two is removed on updating the brightness. This arithmetic is
not necessary because the range of brightness is 0 ~ 127= .Signed-off-by: Milo(Woogyom) Kim
Cc: Linus Walleij
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Feb, 2012
1 commit
-
In current code, pltfm->als_vmin is set to LM3530_ALS_WINDOW_mV and
pltfm->als_vmax is 0. This does not make sense. I think what we want
here is setting pltfm->als_vmax to LM3530_ALS_WINDOW_mV.Both als_vmin and als_vmax local variables will be set to
pltfm->als_vmin and pltfm->als_vmax by a few lines latter. Thus also
remove a redundant assignment for als_vmin and als_vmax in this patch.Signed-off-by: Axel Lin
Cc: Shreshtha Kumar Sahu
Acked-by: Milo(Woogyom) Kim
Tested-by: Milo(Woogyom) Kim
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jan, 2012
1 commit
-
Factor out some boilerplate code for i2c driver registration
into module_i2c_driver.Signed-off-by: Axel Lin
Cc: Haojian Zhuang
Cc: Mark Brown
Cc: Richard Purdie
Cc: Michael Hennerich
Cc: Mike Rapoport
Cc: Guennadi Liakhovetski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Nov, 2011
1 commit
-
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
Revert "tracing: Include module.h in define_trace.h"
irq: don't put module.h into irq.h for tracking irqgen modules.
bluetooth: macroize two small inlines to avoid module.h
ip_vs.h: fix implicit use of module_get/module_put from module.h
nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
include: replace linux/module.h with "struct module" wherever possible
include: convert various register fcns to macros to avoid include chaining
crypto.h: remove unused crypto_tfm_alg_modname() inline
uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
pm_runtime.h: explicitly requires notifier.h
linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
miscdevice.h: fix up implicit use of lists and types
stop_machine.h: fix implicit use of smp.h for smp_processor_id
of: fix implicit use of errno.h in include/linux/of.h
of_platform.h: delete needless include
acpi: remove module.h include from platform/aclinux.h
miscdevice.h: delete unnecessary inclusion of module.h
device_cgroup.h: delete needless include
net: sch_generic remove redundant use of
net: inet_timewait_sock doesnt need
...Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
- drivers/media/dvb/frontends/dibx000_common.c
- drivers/media/video/{mt9m111.c,ov6650.c}
- drivers/mfd/ab3550-core.c
- include/linux/dmaengine.h
01 Nov, 2011
3 commits
-
According to the comments in include/linux/init.h:
"Pointers to __devexit functions must use __devexit_p(function_name), the
wrapper will insert either the function_name or NULL, depending on the config
options."We have __devexit annotation for lm3530_remove(), so add __devexit_p to
the `struct i2c_driver'.Signed-off-by: Axel Lin
Cc: Shreshtha Kumar SAHU
Cc: Richard Purdie
Acked-by: Linus Walleij
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A few new i2c-drivers came into the kernel which clear the
clientdata-pointer on exit or error. This is obsolete meanwhile, the core
will do it.Signed-off-by: Wolfram Sang
Cc: Richard Purdie
Acked-by: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A pending cleanup will mean that module.h won't be implicitly
everywhere anymore. Make sure the modular drivers in the leds
dir are actually calling out for explicitly in advance.Signed-off-by: Paul Gortmaker
26 Jul, 2011
1 commit
-
Provide the support for auto calibration of ALS Zone boundaries based on
min/max ALS input voltage.Signed-off-by: Shreshtha Kumar Sahu
Signed-off-by: Linus Walleij
Cc: Richard Purdie
Cc: Lee Jones
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 May, 2011
1 commit
-
Add add regulator support to lm3530 driver. The lm3530 driver needs to
get proper regulator during device probe and enable it before accessing
the device. Also it disables the regulator in case of brightness ==
LED_OFF, and puts it back during driver removal.[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Shreshtha Kumar Sahu
Cc: Lee Jones
Cc: Shreshtha Kumar Sahu
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 May, 2011
1 commit
-
Adding the necessary MODULE_DEVICE_TABLE() information allows the driver
to be automatically loaded by udev.Signed-off-by: Axel Lin
Cc: Shreshtha Kumar SAHU
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Mar, 2011
1 commit
-
Simple backlight driver for National Semiconductor LM3530. Presently only
manual mode is supported, PWM and ALS support to be added.Signed-off-by: Shreshtha Kumar Sahu
Cc: Linus Walleij
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds