leds-lm3642.c (df07cf81268192e42c4cdf91f5f4bf9aaac1b2f0) leds-lm3642.c (98ea1ea20cb7090d5ae2003c23fc8a7f14fca4c7)
1/*
2* Simple driver for Texas Instruments LM3642 LED Flash driver chip
3* Copyright (C) 2012 Texas Instruments
4*
5* This program is free software; you can redistribute it and/or modify
6* it under the terms of the GNU General Public License version 2 as
7* published by the Free Software Foundation.
8*

--- 79 unchanged lines hidden (view full) ---

88 struct lm3642_platform_data *pdata;
89 struct regmap *regmap;
90 struct mutex lock;
91
92 unsigned int last_flag;
93};
94
95/* chip initialize */
1/*
2* Simple driver for Texas Instruments LM3642 LED Flash driver chip
3* Copyright (C) 2012 Texas Instruments
4*
5* This program is free software; you can redistribute it and/or modify
6* it under the terms of the GNU General Public License version 2 as
7* published by the Free Software Foundation.
8*

--- 79 unchanged lines hidden (view full) ---

88 struct lm3642_platform_data *pdata;
89 struct regmap *regmap;
90 struct mutex lock;
91
92 unsigned int last_flag;
93};
94
95/* chip initialize */
96static int __devinit lm3642_chip_init(struct lm3642_chip_data *chip)
96static int lm3642_chip_init(struct lm3642_chip_data *chip)
97{
98 int ret;
99 struct lm3642_platform_data *pdata = chip->pdata;
100
101 /* set enable register */
102 ret = regmap_update_bits(chip->regmap, REG_ENABLE, EX_PIN_ENABLE_MASK,
103 pdata->tx_pin);
104 if (ret < 0)

--- 203 unchanged lines hidden (view full) ---

308}
309
310static const struct regmap_config lm3642_regmap = {
311 .reg_bits = 8,
312 .val_bits = 8,
313 .max_register = REG_MAX,
314};
315
97{
98 int ret;
99 struct lm3642_platform_data *pdata = chip->pdata;
100
101 /* set enable register */
102 ret = regmap_update_bits(chip->regmap, REG_ENABLE, EX_PIN_ENABLE_MASK,
103 pdata->tx_pin);
104 if (ret < 0)

--- 203 unchanged lines hidden (view full) ---

308}
309
310static const struct regmap_config lm3642_regmap = {
311 .reg_bits = 8,
312 .val_bits = 8,
313 .max_register = REG_MAX,
314};
315
316static int __devinit lm3642_probe(struct i2c_client *client,
316static int lm3642_probe(struct i2c_client *client,
317 const struct i2c_device_id *id)
318{
319 struct lm3642_platform_data *pdata = client->dev.platform_data;
320 struct lm3642_chip_data *chip;
321
322 int err;
323
324 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {

--- 138 unchanged lines hidden ---
317 const struct i2c_device_id *id)
318{
319 struct lm3642_platform_data *pdata = client->dev.platform_data;
320 struct lm3642_chip_data *chip;
321
322 int err;
323
324 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {

--- 138 unchanged lines hidden ---