aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-02-21rtc: rtc-sun4v: use pr_warn() instead of printk()Jingoo Han1-4/+6
Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: rtc-vr41xx: use dev_info() instead of printk()Jingoo Han1-1/+1
Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: rtc-rs5c313: use pr_err() instead of printk()Jingoo Han1-2/+3
Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: rtc-at91rm9200: use dev_dbg()/dev_err() instead of printk()/pr_debug()Jingoo Han1-9/+8
Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug()Jingoo Han1-6/+4
Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: rtc-ds2404: use dev_err() instead of printk()Jingoo Han1-2/+2
Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: rtc-efi: use dev_err()/dev_warn()/pr_err() instead of printk()Jingoo Han1-4/+6
Fix the checkpatch warnings as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... WARNING: please, no space before tabs Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: max77686: use dev_info() instead of printk()Jingoo Han1-2/+2
Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: use dev_warn()/dev_dbg()/pr_err() instead of printk()Jingoo Han2-6/+9
Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-sa1100.c: move clock enable/disable to probe/removeChao Xie1-5/+6
The original sa1100_rtc_open/sa1100_rtc_release will be called when the /dev/rtc0 is opened or closed. In fact, these two functions will enable/disable the clock. Disabling clock will make rtc not work. So only enable/disable clock when probe/remove the device. Signed-off-by: Chao Xie <chao.xie@marvell.com> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Leo Song <liangs@marvell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: max8997: add driver for max8997 rtcJonghwa Lee3-0/+564
Add an rtc driver for Maxim 8997 multifunction chip. Max8997 has rtc module in it. and it can be used for timekeeping clock and system alarm. It provide various operational mode those are BCD/binary, 24/12hour, am/pm. Driver sets binary/24/ for default. Maxim 8997 also supports SMPL(Sudden Momentary Power Loss), WTSR (Watchdog Timeout and Software Reset). Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Cc: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-s3c.c: use dev_dbg() instaed of pr_debug()Jingoo Han1-9/+9
Use dev_dbg() instaed of pr_debug() to be consistent. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21arm: mvebu: add RTC support for Armada 370 and Armada XPGregory CLEMENT1-0/+6
The Armada 370 and Armada XP Socs have the same controller that the one used in the orion platforms. This patch updates the device tree for these SoCs. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Acked-by: Andrew Lunn <andrew@lunn.ch> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-pl031.c: add wakeup supportRob Herring1-0/+2
Mark the pl031 as wake-up capable so that rtcwake and suspend test can work. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: add support for spi rtc rx4581Torben Hohn3-0/+323
[akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Torben Hohn <torbenh@linutronix.de> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-tps65910.c: set irq flag to IRQF_EARLY_RESUME during irq requestLaxman Dewangan1-1/+1
All interrupt get disabled during system suspend and enabled during system resume. The enabling/disabling of interrupt happen in sequence of interrupt registration with framework. Therefore, in resume, the parent interrupt of this device enabled before the RTC irq interrupt enabled. If RTC is enabled for alarm wake and if system wake by alarm then there is interrupt pending for RTC. In resume, the parent interrupt get enabled before the rtc interrupt and hence ISR get served. In ISR, it founds that rtc interrupt is disabled and so it does not call the rtc isr handler and hence it misses the interrupt. Setting flag for early resume so that rtc interrupt get enabled before parent interrupt and so rtc interrupt get enabled when parent interrupt handler check for interrupt of device and call the rtc handler if it is there. This way it will not miss the interrupt. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-tps65910.c: use sleep_pm_ops macro for initialising suspend/resume callbacksLaxman Dewangan1-9/+4
Use SET_SYSTEM_SLEEP_PM_OPS for setting suspend/resume callbacks for dev_pm_ops. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-tps65910.c: remove unnecessary irq stat save and restoreLaxman Dewangan1-19/+2
The driver stores the interrupt enable register before going to suspend and restore in resume. Also it enables alarm before going to suspend. The driver only write the Interrupt enable register for enabling ALARM and does not enable any other bits. So it is not require to save complete register and enable ALARM interrupt before suspend and restore in resume. Also ALARM interrupt already enable if alarm is enabled before going to suspend and hence it is not require to enable explictly in suspend. Removing such above code. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-tps65910.c: enable/disable wake in suspend/resumeLaxman Dewangan1-1/+11
Making the rtc driver as wakeup capabale and leaving the wake enable/disable decision to user space through a sysfs attribute. In suspend, enable wake if device wakeup enabled. In resume disable wake again. This change is inline with the Documentation/power/devices.txt# /sys/devices/.../power/wakeup files Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: add RTC driver for TPS80031/TPS80032Laxman Dewangan3-0/+358
Add an RTC driver for TPS80031/TPS80032 chips by TI. This driver supports: - Setting and getting time and date. - Setting and reading alarm time. - Alarm and interrupt functionlity. [akpm@linux-foundation.org: remove obsolete __devinit/__devexit] Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: add new lp8788 rtc driverKim, Milo3-0/+351
TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight driver and current sinks. This patch enables LP8788 rtc module. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Cc: "devendra.aaru" <devendra.aaru@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-ds2404.c: use module_platform_driver macroSrinivas Kandagatla1-13/+1
Remove removes some code duplication by using module_platform_driver(). Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc: remove unnecessary semicolonsPeter Senna Tschudin2-2/+2
Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-pxa.c: avoid cpuid checkingHaojian Zhuang1-4/+1
pxa-rtc is widely used in pxa27x/pxa3xx/pxa93x/pxa95x. Checking cpuid in pxa-rtc driver is unnecessary since we assign on-chip device in soc files. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc: use of_match_ptr() macroSachin Kamat6-7/+16
This eliminates having an #ifdef returning NULL for the case when OF is disabled. Maintains consistency in cases where OF is always selected. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc-pcf8523: add low battery voltage supportJesper Nilsson1-0/+31
Implement reading of the battery voltage low signal for rtc-pcf8523. The bit is read-only and cannot be cleared by software, so no clear function is implemented. [akpm@linux-foundation.org: omit pcf8563_rtc_ioctl() if CONFIG_RTC_INTF_DEV=n] Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21rtc: max77686: add Maxim 77686 driverJonghwa Lee3-0/+652
Add a driver to support max77686 rtc. MAX77686 rtc support smpl and wtsr mode. It has two alarm register which can be used for alarming to wake system up. This drvier uses regmap to access its register. [akpm@linux-foundation.org: remove inline, __devinit annotations] [jg1.han@samsung.com: fix build warnings] [akpm@linux-foundation.org: simplify code] Signed-off-by: Chiwoong Byun <woong.byun@samsung.com> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Myugnjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-pxa.c: fix alarm can't wake up system issueLeo Song1-3/+4
Fix alarm can't wake up system issue Signed-off-by: Leo Song <liangs@marvell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc/rtc-pxa.c: fix alarm not match issueLeo Song1-1/+10
Fix pxa rtc alarm issue by setting week of month and day of week in rdar/rdcr or it would not match. Signed-off-by: Leo Song <liangs@marvell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/rtc: dump small buffers via %*phAndy Shevchenko3-44/+8
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21kernel/nsproxy.c: remove duplicate task_cred_xxx for user_nsYuanhan Liu1-2/+1
We can use user_ns, which is also assigned from task_cred_xxx(tsk, user_ns), at the beginning of copy_namespaces(). Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21binfmt_elf: remove unused argument in fill_elf_headerZhang Yanfei1-3/+3
In fill_elf_header(), elf->e_ident[EI_OSABI] is always set to ELF_OSABI, so remove the unused argument 'osabi'. Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21checkpatch: fix USLEEP_RANGE testBruce Allan1-2/+2
Do not test udelay() for a value less than 10usec when passed a variable instead of a hard-coded number; there is no way for checkpatch to know the value of the variable. As it is today, it will complain about variables with alphanumeric characters plus '_', e.g. foo_bar, but not variables with other characters, eg. foo->bar. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21checkpatch: Add check for kcalloc argument orderJoe Perches1-0/+6
kcalloc is sometimes misused with the first and second arguments switched. Same issue with kmalloc_array too. Bleat if sizeof is the first argument Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21checkpatch: don't emit the CamelCase warning for PageFooJoe Perches1-0/+1
I'm getting a ton of these: WARNING: Avoid CamelCase: <PageTransHuge> #140: FILE: mm/migrate.c:1576: + if (PageTransHuge(page) && page_count(page) != 3) { So exclude anything which starts with "Page". Tested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21checkpatch: add Joe to MAINTAINERSJoe Perches1-1/+2
Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21checkpatch: warn on unnecessary __dev<foo> section markingsJoe Perches1-0/+6
Get people to stop adding __devinit and __devexit section markings. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Andy Whitcroft <apw@canonical.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21checkpatch: prefer dev_<level>( to dev_printk(KERN_<LEVEL>Joe Perches1-0/+9
Add YA check to printk style. dev_<level> uses are functions and generate smaller object code than dev_printk(KERN_<LEVEL>. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21decompressors: make the default XZ_DEC_* config match the selected architectureFlorian Fainelli1-6/+6
Change the defautl XZ_DEC_* config symbol to match the configured architecture. It is perfectly legitimate to support multiple XZ BCJ filters for different architectures (e.g.: to mount foreign squashfs/xz compressed filesystems), it is however more natural not to select them all by default, but only the one matching the configured architecture. Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Lasse Collin <lasse.collin@tukaani.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21decompressors: drop dependency on CONFIG_EXPERTFlorian Fainelli1-6/+6
Remove the XZ_DEC_* depedencey on CONFIG_EXPERT as recommended by Lasse Colin. Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Lasse Collin <lasse.collin@tukaani.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21decompressors: group XZ_DEC_* symbols under an if XZ_BCJ / endifFlorian Fainelli1-6/+4
Group all architecture-specific BCJ filter configuration symbols under an if XZ_BCJ / endif statement. Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Lasse Collin <lasse.collin@tukaani.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21lib/parser.c: fix up comments for valid return values from match_numberNamjae Jeon1-3/+3
match_number() has return values of -ENOMEM, -EINVAL and -ERANGE. So, for all the functions calling match_number, the return value should include these values. Fix up the comments to reflect the correct values. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21backlight: lp855x_bl: simplify bl_get_brightness()Kim, Milo1-24/+0
Getting the brightness value is not critical, no need to read the actual register value. To simplify it, just return the 'bl->props.brightness' value. Then, lp855x_read_byte() can be removed, not used any more. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21backlight: lp855x_bl: support new LP8557 deviceKim, Milo4-18/+94
LP8557 is one of LP855x family device, but it has different register map and initialization process. To support this device, device specific configuration is done through the lp855x_device_config structure. Few register definitions are fixed for better readability. BRIGHTNESS_CTRL -> LP855X_BRIGHTNESS_CTRL DEVICE_CTRL -> LP855X_DEVICE_CTRL EEPROM_START -> LP855X_EEPROM_START EEPROM_END -> LP855X_EEPROM_END EPROM_START -> LP8556_EPROM_START EPROM_END -> LP8556_EPROM_END And LP8557 register definitions are added. New register function, lp855x_update_bit() is added. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21backlight: lp855x_bl: introduce device configuration flowKim, Milo1-10/+68
At this moment, LP855x device driver has fixed register configuration. For example, fixed register addresses and values are set on the device initialization. But new device of LP855x family, LP8557 has different register map and initialization sequence. To support new device architecture, initialization process should be changed. Introduce new structure: lp855x_device_config ============================================= With lp855x_device_config, device specific features are configurable. Use configurable function calls and register addresses rather than fixed values. Change on device initialization =============================== In old LP855x driver architecture, the device initialization was simple. - Just update the brightness/device control register/ROM area(optional). In new LP855x driver architecture, two more works are added - pre_init and post_init. Those init functions are optional, used for new device LP8557. New device initialization flow: generic sequence ================================================= 1) pre_init_device() 2) update the brightness register 3) update the device control register 4) update ROM area if need 5) post_init_device() Name change =========== Use generic name 'lp855x_configure()' instead of 'lp855x_init_registers()'. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/video/backlight/adp88?0_bl.c: fix resumeLars-Peter Clausen2-2/+2
Clearing the NSTBY bit in the control register also automatically clears the BLEN bit. So we need to make sure to set it again during resume, otherwise the backlight will stay off. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/video/backlight/lm3630_bl.c: remove ret = -EIO of lm3630_backlight_register()Jingoo Han1-2/+2
There is no need to return -EIO, because backlight_device_register() already returns correct error values. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Daniel Jeong <daniel.jeong@ti.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/video/backlight/s6e63m0.c: report ->gamma_table_count correctlyDan Carpenter1-1/+1
gamma_table has 3 arrays which each hold MAX_GAMMA_LEVEL pointers to int. The current code sets ->gamma_table_count to 6 on 64bit arches and to 3 on 32 bit arches. It should be 3 on everything. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Jingoo Han <jg1.han@samsung.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21drivers/video/backlight/88pm860x_bl.c: add missing of_node_put()Axel Lin1-1/+4
of_find_node_by_name() returns a node pointer with refcount incremented, use of_node_put() on it when done. of_find_node_by_name() will call of_node_put() against the node pass to from parameter, thus we also need to call of_node_get(from) before calling of_find_node_by_name(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: Jingoo Han <jg1.han@samsung.com> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21backlight: add an AS3711 PMIC backlight driverGuennadi Liakhovetski3-0/+388
This is an initial commit of a backlight driver, using step-up DCDC power supplies on AS3711 PMIC. Only one mode has actually been tested, several further modes have been implemented "dry," but disabled to avoid accidental hardware damage. Anyone wishing to use any of those modes will have to modify the driver. Tested on sh73a0-based kzm9g board. Only one mode has been tested and is enabled. That mode copies the sample code from the manufacturer. Deviations from that code proved to be fatal for the hardware... Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>