mirror of
https://github.com/t2linux/kernel.git
synced 2026-04-30 13:48:59 -07:00
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull led updates from Bryan Wu: "Sorry for the late pull request, since I'm just back from vacation. LED subsystem updates for 3.12: - pca9633 driver DT supporting and pca9634 chip supporting - restore legacy device attributes for lp5521 - other fixing and updates" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (28 commits) leds: wm831x-status: Request a REG resource leds: trigger: ledtrig-backlight: Fix invalid memory access in fb_event notification callback leds-pca963x: Fix device tree parsing leds-pca9633: Rename to leds-pca963x leds-pca9633: Add mutex to the ledout register leds-pca9633: Unique naming of the LEDs leds-pca9633: Add support for PCA9634 leds: lp5562: use LP55xx common macros for device attributes Documentation: leds-lp5521,lp5523: update device attribute information leds: lp5523: remove unnecessary writing commands leds: lp5523: restore legacy device attributes leds: lp5523: LED MUX configuration on initializing leds: lp5523: make separate API for loading engine leds: lp5521: remove unnecessary writing commands leds: lp5521: restore legacy device attributes leds: lp55xx: add common macros for device attributes leds: lp55xx: add common data structure for program Documentation: leds: Fix a typo leds: ss4200: Fix incorrect placement of __initdata leds: clevo-mail: Fix incorrect placement of __initdata ...
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Binding for TI/National Semiconductor LP55xx Led Drivers
|
||||
|
||||
Required properties:
|
||||
- compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562"
|
||||
- compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" or "ti,lp8501"
|
||||
- reg: I2C slave address
|
||||
- clock-mode: Input clock mode, (0: automode, 1: internal, 2: external)
|
||||
|
||||
@@ -11,6 +11,11 @@ Each child has own specific current settings
|
||||
|
||||
Optional properties:
|
||||
- label: Used for naming LEDs
|
||||
- pwr-sel: LP8501 specific property. Power selection for output channels.
|
||||
0: D1~9 are connected to VDD
|
||||
1: D1~6 with VDD, D7~9 with VOUT
|
||||
2: D1~6 with VOUT, D7~9 with VDD
|
||||
3: D1~9 are connected to VOUT
|
||||
|
||||
Alternatively, each child can have specific channel name
|
||||
- chan-name: Name of each channel name
|
||||
@@ -145,3 +150,68 @@ lp5562@30 {
|
||||
max-cur = /bits/ 8 <0x60>;
|
||||
};
|
||||
};
|
||||
|
||||
example 4) LP8501
|
||||
9 channels are defined. The 'pwr-sel' is LP8501 specific property.
|
||||
Others are same as LP5523.
|
||||
|
||||
lp8501@32 {
|
||||
compatible = "ti,lp8501";
|
||||
reg = <0x32>;
|
||||
clock-mode = /bits/ 8 <2>;
|
||||
pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
|
||||
|
||||
chan0 {
|
||||
chan-name = "d1";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
};
|
||||
|
||||
chan1 {
|
||||
chan-name = "d2";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
};
|
||||
|
||||
chan2 {
|
||||
chan-name = "d3";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
};
|
||||
|
||||
chan3 {
|
||||
chan-name = "d4";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
};
|
||||
|
||||
chan4 {
|
||||
chan-name = "d5";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
};
|
||||
|
||||
chan5 {
|
||||
chan-name = "d6";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
};
|
||||
|
||||
chan6 {
|
||||
chan-name = "d7";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
};
|
||||
|
||||
chan7 {
|
||||
chan-name = "d8";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
};
|
||||
|
||||
chan8 {
|
||||
chan-name = "d9";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
LEDs connected to pca9632, pca9633 or pca9634
|
||||
|
||||
Required properties:
|
||||
- compatible : should be : "nxp,pca9632", "nxp,pca9633" or "nxp,pca9634"
|
||||
|
||||
Optional properties:
|
||||
- nxp,totem-pole : use totem pole (push-pull) instead of default open-drain
|
||||
- nxp,hw-blink : use hardware blinking instead of software blinking
|
||||
|
||||
Each led is represented as a sub-node of the nxp,pca963x device.
|
||||
|
||||
LED sub-node properties:
|
||||
- label : (optional) see Documentation/devicetree/bindings/leds/common.txt
|
||||
- reg : number of LED line (could be from 0 to 3 in pca9632 or pca9633
|
||||
or 0 to 7 in pca9634)
|
||||
- linux,default-trigger : (optional)
|
||||
see Documentation/devicetree/bindings/leds/common.txt
|
||||
|
||||
Examples:
|
||||
|
||||
pca9632: pca9632 {
|
||||
compatible = "nxp,pca9632";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x62>;
|
||||
|
||||
red@0 {
|
||||
label = "red";
|
||||
reg = <0>;
|
||||
linux,default-trigger = "none";
|
||||
};
|
||||
green@1 {
|
||||
label = "green";
|
||||
reg = <1>;
|
||||
linux,default-trigger = "none";
|
||||
};
|
||||
blue@2 {
|
||||
label = "blue";
|
||||
reg = <2>;
|
||||
linux,default-trigger = "none";
|
||||
};
|
||||
unused@3 {
|
||||
label = "unused";
|
||||
reg = <3>;
|
||||
linux,default-trigger = "none";
|
||||
};
|
||||
};
|
||||
@@ -18,7 +18,25 @@ All three channels can be also controlled using the engine micro programs.
|
||||
More details of the instructions can be found from the public data sheet.
|
||||
|
||||
LP5521 has the internal program memory for running various LED patterns.
|
||||
For the details, please refer to 'firmware' section in leds-lp55xx.txt
|
||||
There are two ways to run LED patterns.
|
||||
|
||||
1) Legacy interface - enginex_mode and enginex_load
|
||||
Control interface for the engines:
|
||||
x is 1 .. 3
|
||||
enginex_mode : disabled, load, run
|
||||
enginex_load : store program (visible only in engine load mode)
|
||||
|
||||
Example (start to blink the channel 2 led):
|
||||
cd /sys/class/leds/lp5521:channel2/device
|
||||
echo "load" > engine3_mode
|
||||
echo "037f4d0003ff6000" > engine3_load
|
||||
echo "run" > engine3_mode
|
||||
|
||||
To stop the engine:
|
||||
echo "disabled" > engine3_mode
|
||||
|
||||
2) Firmware interface - LP55xx common interface
|
||||
For the details, please refer to 'firmware' section in leds-lp55xx.txt
|
||||
|
||||
sysfs contains a selftest entry.
|
||||
The test communicates with the chip and checks that
|
||||
|
||||
@@ -28,7 +28,26 @@ If both fields are NULL, 'lp5523' is used by default.
|
||||
/sys/class/leds/lp5523:channelN (N: 0 ~ 8)
|
||||
|
||||
LP5523 has the internal program memory for running various LED patterns.
|
||||
For the details, please refer to 'firmware' section in leds-lp55xx.txt
|
||||
There are two ways to run LED patterns.
|
||||
|
||||
1) Legacy interface - enginex_mode, enginex_load and enginex_leds
|
||||
Control interface for the engines:
|
||||
x is 1 .. 3
|
||||
enginex_mode : disabled, load, run
|
||||
enginex_load : microcode load (visible only in load mode)
|
||||
enginex_leds : led mux control (visible only in load mode)
|
||||
|
||||
cd /sys/class/leds/lp5523:channel2/device
|
||||
echo "load" > engine3_mode
|
||||
echo "9d80400004ff05ff437f0000" > engine3_load
|
||||
echo "111111111" > engine3_leds
|
||||
echo "run" > engine3_mode
|
||||
|
||||
To stop the engine:
|
||||
echo "disabled" > engine3_mode
|
||||
|
||||
2) Firmware interface - LP55xx common interface
|
||||
For the details, please refer to 'firmware' section in leds-lp55xx.txt
|
||||
|
||||
Selftest uses always the current from the platform data.
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
LP5521/LP5523/LP55231 Common Driver
|
||||
===================================
|
||||
LP5521/LP5523/LP55231/LP5562/LP8501 Common Driver
|
||||
=================================================
|
||||
|
||||
Authors: Milo(Woogyom) Kim <milo.kim@ti.com>
|
||||
|
||||
Description
|
||||
-----------
|
||||
LP5521, LP5523/55231 and LP5562 have common features as below.
|
||||
LP5521, LP5523/55231, LP5562 and LP8501 have common features as below.
|
||||
|
||||
Register access via the I2C
|
||||
Device initialization/deinitialization
|
||||
@@ -109,6 +109,30 @@ As soon as 'loading' is set to 0, registered callback is called.
|
||||
Inside the callback, the selected engine is loaded and memory is updated.
|
||||
To run programmed pattern, 'run_engine' attribute should be enabled.
|
||||
|
||||
The pattern sqeuence of LP8501 is same as LP5523.
|
||||
However pattern data is specific.
|
||||
Ex 1) Engine 1 is used
|
||||
echo 1 > /sys/bus/i2c/devices/xxxx/select_engine
|
||||
echo 1 > /sys/class/firmware/lp8501/loading
|
||||
echo "9d0140ff7e0040007e00a001c000" > /sys/class/firmware/lp8501/data
|
||||
echo 0 > /sys/class/firmware/lp8501/loading
|
||||
echo 1 > /sys/bus/i2c/devices/xxxx/run_engine
|
||||
|
||||
Ex 2) Engine 2 and 3 are used at the same time
|
||||
echo 2 > /sys/bus/i2c/devices/xxxx/select_engine
|
||||
sleep 1
|
||||
echo 1 > /sys/class/firmware/lp8501/loading
|
||||
echo "9d0140ff7e0040007e00a001c000" > /sys/class/firmware/lp8501/data
|
||||
echo 0 > /sys/class/firmware/lp8501/loading
|
||||
sleep 1
|
||||
echo 3 > /sys/bus/i2c/devices/xxxx/select_engine
|
||||
sleep 1
|
||||
echo 1 > /sys/class/firmware/lp8501/loading
|
||||
echo "9d0340ff7e0040007e00a001c000" > /sys/class/firmware/lp8501/data
|
||||
echo 0 > /sys/class/firmware/lp8501/loading
|
||||
sleep 1
|
||||
echo 1 > /sys/class/leds/d1/device/run_engine
|
||||
|
||||
( 'run_engine' and 'firmware_cb' )
|
||||
The sequence of running the program data is common.
|
||||
But each device has own specific register addresses for commands.
|
||||
|
||||
+22
-12
@@ -194,11 +194,11 @@ config LEDS_LP3944
|
||||
module will be called leds-lp3944.
|
||||
|
||||
config LEDS_LP55XX_COMMON
|
||||
tristate "Common Driver for TI/National LP5521, LP5523/55231 and LP5562"
|
||||
depends on LEDS_LP5521 || LEDS_LP5523 || LEDS_LP5562
|
||||
tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501"
|
||||
depends on LEDS_LP5521 || LEDS_LP5523 || LEDS_LP5562 || LEDS_LP8501
|
||||
select FW_LOADER
|
||||
help
|
||||
This option supports common operations for LP5521 and LP5523/55231
|
||||
This option supports common operations for LP5521/5523/55231/5562/8501
|
||||
devices.
|
||||
|
||||
config LEDS_LP5521
|
||||
@@ -232,6 +232,18 @@ config LEDS_LP5562
|
||||
Driver provides direct control via LED class and interface for
|
||||
programming the engines.
|
||||
|
||||
config LEDS_LP8501
|
||||
tristate "LED Support for TI LP8501 LED driver chip"
|
||||
depends on LEDS_CLASS && I2C
|
||||
select LEDS_LP55XX_COMMON
|
||||
help
|
||||
If you say yes here you get support for TI LP8501 LED driver.
|
||||
It is 9 channel chip with programmable engines.
|
||||
Driver provides direct control via LED class and interface for
|
||||
programming the engines.
|
||||
It is similar as LP5523, but output power selection is available.
|
||||
And register layout and engine program schemes are different.
|
||||
|
||||
config LEDS_LP8788
|
||||
tristate "LED support for the TI LP8788 PMIC"
|
||||
depends on LEDS_CLASS
|
||||
@@ -279,13 +291,14 @@ config LEDS_PCA955X
|
||||
LED driver chips accessed via the I2C bus. Supported
|
||||
devices include PCA9550, PCA9551, PCA9552, and PCA9553.
|
||||
|
||||
config LEDS_PCA9633
|
||||
tristate "LED support for PCA9633 I2C chip"
|
||||
config LEDS_PCA963X
|
||||
tristate "LED support for PCA963x I2C chip"
|
||||
depends on LEDS_CLASS
|
||||
depends on I2C
|
||||
help
|
||||
This option enables support for LEDs connected to the PCA9633
|
||||
LED driver chip accessed via the I2C bus.
|
||||
This option enables support for LEDs connected to the PCA963x
|
||||
LED driver chip accessed via the I2C bus. Supported
|
||||
devices include PCA9633 and PCA9634
|
||||
|
||||
config LEDS_WM831X_STATUS
|
||||
tristate "LED support for status LEDs on WM831x PMICs"
|
||||
@@ -398,10 +411,7 @@ config LEDS_MC13783
|
||||
config LEDS_NS2
|
||||
tristate "LED support for Network Space v2 GPIO LEDs"
|
||||
depends on LEDS_CLASS
|
||||
depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || \
|
||||
MACH_NETSPACE_MAX_V2 || MACH_D2NET_V2 || \
|
||||
MACH_NETSPACE_V2_DT || MACH_INETSPACE_V2_DT || \
|
||||
MACH_NETSPACE_MAX_V2_DT || MACH_NETSPACE_MINI_V2_DT
|
||||
depends on ARCH_KIRKWOOD
|
||||
default y
|
||||
help
|
||||
This option enable support for the dual-GPIO LED found on the
|
||||
@@ -410,8 +420,8 @@ config LEDS_NS2
|
||||
|
||||
config LEDS_NETXBIG
|
||||
tristate "LED support for Big Network series LEDs"
|
||||
depends on MACH_NET2BIG_V2 || MACH_NET5BIG_V2
|
||||
depends on LEDS_CLASS
|
||||
depends on ARCH_KIRKWOOD
|
||||
default y
|
||||
help
|
||||
This option enable support for LEDs found on the LaCie 2Big
|
||||
|
||||
@@ -27,6 +27,7 @@ obj-$(CONFIG_LEDS_LP55XX_COMMON) += leds-lp55xx-common.o
|
||||
obj-$(CONFIG_LEDS_LP5521) += leds-lp5521.o
|
||||
obj-$(CONFIG_LEDS_LP5523) += leds-lp5523.o
|
||||
obj-$(CONFIG_LEDS_LP5562) += leds-lp5562.o
|
||||
obj-$(CONFIG_LEDS_LP8501) += leds-lp8501.o
|
||||
obj-$(CONFIG_LEDS_LP8788) += leds-lp8788.o
|
||||
obj-$(CONFIG_LEDS_TCA6507) += leds-tca6507.o
|
||||
obj-$(CONFIG_LEDS_CLEVO_MAIL) += leds-clevo-mail.o
|
||||
@@ -34,7 +35,7 @@ obj-$(CONFIG_LEDS_HP6XX) += leds-hp6xx.o
|
||||
obj-$(CONFIG_LEDS_OT200) += leds-ot200.o
|
||||
obj-$(CONFIG_LEDS_FSG) += leds-fsg.o
|
||||
obj-$(CONFIG_LEDS_PCA955X) += leds-pca955x.o
|
||||
obj-$(CONFIG_LEDS_PCA9633) += leds-pca9633.o
|
||||
obj-$(CONFIG_LEDS_PCA963X) += leds-pca963x.o
|
||||
obj-$(CONFIG_LEDS_DA903X) += leds-da903x.o
|
||||
obj-$(CONFIG_LEDS_DA9052) += leds-da9052.o
|
||||
obj-$(CONFIG_LEDS_WM831X_STATUS) += leds-wm831x-status.o
|
||||
|
||||
@@ -157,7 +157,7 @@ static int pm860x_led_dt_init(struct platform_device *pdev,
|
||||
static int pm860x_led_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
|
||||
struct pm860x_led_pdata *pdata = pdev->dev.platform_data;
|
||||
struct pm860x_led_pdata *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct pm860x_led *data;
|
||||
struct resource *res;
|
||||
int ret = 0;
|
||||
|
||||
@@ -87,7 +87,7 @@ static int adp5520_led_setup(struct adp5520_led *led)
|
||||
|
||||
static int adp5520_led_prepare(struct platform_device *pdev)
|
||||
{
|
||||
struct adp5520_leds_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct adp5520_leds_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct device *dev = pdev->dev.parent;
|
||||
int ret = 0;
|
||||
|
||||
@@ -103,7 +103,7 @@ static int adp5520_led_prepare(struct platform_device *pdev)
|
||||
|
||||
static int adp5520_led_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct adp5520_leds_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct adp5520_leds_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct adp5520_led *led, *led_dat;
|
||||
struct led_info *cur_led;
|
||||
int ret, i;
|
||||
@@ -185,7 +185,7 @@ err:
|
||||
|
||||
static int adp5520_led_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct adp5520_leds_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct adp5520_leds_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct adp5520_led *led;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ static int blink_set(struct led_classdev *cdev,
|
||||
|
||||
static int asic3_led_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct asic3_led *led = pdev->dev.platform_data;
|
||||
struct asic3_led *led = dev_get_platdata(&pdev->dev);
|
||||
int ret;
|
||||
|
||||
ret = mfd_cell_enable(pdev);
|
||||
@@ -127,7 +127,7 @@ out:
|
||||
|
||||
static int asic3_led_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct asic3_led *led = pdev->dev.platform_data;
|
||||
struct asic3_led *led = dev_get_platdata(&pdev->dev);
|
||||
|
||||
led_classdev_unregister(led->cdev);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ static int pwmled_probe(struct platform_device *pdev)
|
||||
int i;
|
||||
int status;
|
||||
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
if (!pdata || pdata->num_leds < 1)
|
||||
return -ENODEV;
|
||||
|
||||
@@ -119,7 +119,7 @@ static int pwmled_remove(struct platform_device *pdev)
|
||||
struct pwmled *leds;
|
||||
unsigned i;
|
||||
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
leds = platform_get_drvdata(pdev);
|
||||
|
||||
for (i = 0; i < pdata->num_leds; i++) {
|
||||
|
||||
@@ -684,7 +684,7 @@ static int bd2802_probe(struct i2c_client *client,
|
||||
}
|
||||
|
||||
led->client = client;
|
||||
pdata = led->pdata = client->dev.platform_data;
|
||||
pdata = led->pdata = dev_get_platdata(&client->dev);
|
||||
i2c_set_clientdata(client, led);
|
||||
|
||||
/* Configure RESET GPIO (L: RESET, H: RESET cancel) */
|
||||
|
||||
@@ -40,7 +40,7 @@ static int __init clevo_mail_led_dmi_callback(const struct dmi_system_id *id)
|
||||
* detected as working, but in reality it is not) as low as
|
||||
* possible.
|
||||
*/
|
||||
static struct dmi_system_id __initdata clevo_mail_led_dmi_table[] = {
|
||||
static struct dmi_system_id clevo_mail_led_dmi_table[] __initdata = {
|
||||
{
|
||||
.callback = clevo_mail_led_dmi_callback,
|
||||
.ident = "Clevo D410J",
|
||||
|
||||
@@ -93,7 +93,7 @@ static void da903x_led_set(struct led_classdev *led_cdev,
|
||||
|
||||
static int da903x_led_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct led_info *pdata = pdev->dev.platform_data;
|
||||
struct led_info *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct da903x_led *led;
|
||||
int id, ret;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ static int da9052_led_probe(struct platform_device *pdev)
|
||||
int i;
|
||||
|
||||
da9052 = dev_get_drvdata(pdev->dev.parent);
|
||||
pdata = da9052->dev->platform_data;
|
||||
pdata = dev_get_platdata(da9052->dev);
|
||||
if (pdata == NULL) {
|
||||
dev_err(&pdev->dev, "No platform data\n");
|
||||
goto err;
|
||||
@@ -185,7 +185,7 @@ static int da9052_led_remove(struct platform_device *pdev)
|
||||
int i;
|
||||
|
||||
da9052 = dev_get_drvdata(pdev->dev.parent);
|
||||
pdata = da9052->dev->platform_data;
|
||||
pdata = dev_get_platdata(da9052->dev);
|
||||
pled = pdata->pled;
|
||||
|
||||
for (i = 0; i < pled->num_leds; i++) {
|
||||
|
||||
@@ -233,7 +233,7 @@ static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev)
|
||||
|
||||
static int gpio_led_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct gpio_led_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct gpio_led_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct gpio_leds_priv *priv;
|
||||
int i, ret = 0;
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@ static DEVICE_ATTR(mode, 0644, lm3530_mode_get, lm3530_mode_set);
|
||||
static int lm3530_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct lm3530_platform_data *pdata = client->dev.platform_data;
|
||||
struct lm3530_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
struct lm3530_data *drvdata;
|
||||
int err = 0;
|
||||
|
||||
|
||||
@@ -671,7 +671,7 @@ static int lm3533_led_probe(struct platform_device *pdev)
|
||||
if (!lm3533)
|
||||
return -EINVAL;
|
||||
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
if (!pdata) {
|
||||
dev_err(&pdev->dev, "no platform data\n");
|
||||
return -EINVAL;
|
||||
|
||||
@@ -423,7 +423,7 @@ static const struct regmap_config lm355x_regmap = {
|
||||
static int lm355x_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct lm355x_platform_data *pdata = client->dev.platform_data;
|
||||
struct lm355x_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
struct lm355x_chip_data *chip;
|
||||
|
||||
int err;
|
||||
|
||||
@@ -316,7 +316,7 @@ static const struct regmap_config lm3642_regmap = {
|
||||
static int lm3642_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct lm3642_platform_data *pdata = client->dev.platform_data;
|
||||
struct lm3642_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
struct lm3642_chip_data *chip;
|
||||
|
||||
int err;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user