/linux-4.4.14/drivers/mfd/ |
H A D | lp3943.c | 37 #include <linux/mfd/lp3943.h> 67 .name = "lp3943-pwm", 68 .of_compatible = "ti,lp3943-pwm", 71 .name = "lp3943-gpio", 72 .of_compatible = "ti,lp3943-gpio", 76 int lp3943_read_byte(struct lp3943 *lp3943, u8 reg, u8 *read) lp3943_read_byte() argument 81 ret = regmap_read(lp3943->regmap, reg, &val); lp3943_read_byte() 90 int lp3943_write_byte(struct lp3943 *lp3943, u8 reg, u8 data) lp3943_write_byte() argument 92 return regmap_write(lp3943->regmap, reg, data); lp3943_write_byte() 96 int lp3943_update_bits(struct lp3943 *lp3943, u8 reg, u8 mask, u8 data) lp3943_update_bits() argument 98 return regmap_update_bits(lp3943->regmap, reg, mask, data); lp3943_update_bits() 110 struct lp3943 *lp3943; lp3943_probe() local 113 lp3943 = devm_kzalloc(dev, sizeof(*lp3943), GFP_KERNEL); lp3943_probe() 114 if (!lp3943) lp3943_probe() 117 lp3943->regmap = devm_regmap_init_i2c(cl, &lp3943_regmap_config); lp3943_probe() 118 if (IS_ERR(lp3943->regmap)) lp3943_probe() 119 return PTR_ERR(lp3943->regmap); lp3943_probe() 121 lp3943->pdata = dev_get_platdata(dev); lp3943_probe() 122 lp3943->dev = dev; lp3943_probe() 123 lp3943->mux_cfg = lp3943_mux_cfg; lp3943_probe() 124 i2c_set_clientdata(cl, lp3943); lp3943_probe() 132 struct lp3943 *lp3943 = i2c_get_clientdata(cl); lp3943_remove() local 134 mfd_remove_devices(lp3943->dev); lp3943_remove() 139 { "lp3943", 0 }, 146 { .compatible = "ti,lp3943", }, 156 .name = "lp3943",
|
H A D | Makefile | 111 obj-$(CONFIG_MFD_LP3943) += lp3943.o
|
/linux-4.4.14/drivers/gpio/ |
H A D | gpio-lp3943.c | 17 #include <linux/mfd/lp3943.h> 44 struct lp3943 *lp3943; member in struct:lp3943_gpio 56 struct lp3943 *lp3943 = lp3943_gpio->lp3943; lp3943_gpio_request() local 59 if (test_and_set_bit(offset, &lp3943->pin_used)) lp3943_gpio_request() 68 struct lp3943 *lp3943 = lp3943_gpio->lp3943; lp3943_gpio_free() local 70 clear_bit(offset, &lp3943->pin_used); lp3943_gpio_free() 76 struct lp3943 *lp3943 = lp3943_gpio->lp3943; lp3943_gpio_set_mode() local 77 const struct lp3943_reg_cfg *mux = lp3943->mux_cfg; lp3943_gpio_set_mode() 79 return lp3943_update_bits(lp3943, mux[offset].reg, mux[offset].mask, lp3943_gpio_set_mode() 110 err = lp3943_read_byte(lp3943_gpio->lp3943, addr, &read); lp3943_get_gpio_in_status() 120 struct lp3943 *lp3943 = lp3943_gpio->lp3943; lp3943_get_gpio_out_status() local 121 const struct lp3943_reg_cfg *mux = lp3943->mux_cfg; lp3943_get_gpio_out_status() 125 err = lp3943_read_byte(lp3943, mux[offset].reg, &read); lp3943_get_gpio_out_status() 183 .label = "lp3943", 198 struct lp3943 *lp3943 = dev_get_drvdata(pdev->dev.parent); lp3943_gpio_probe() local 206 lp3943_gpio->lp3943 = lp3943; lp3943_gpio_probe() 224 { .compatible = "ti,lp3943-gpio", }, 233 .name = "lp3943-gpio", 240 MODULE_ALIAS("platform:lp3943-gpio");
|
/linux-4.4.14/drivers/pwm/ |
H A D | pwm-lp3943.c | 15 #include <linux/mfd/lp3943.h> 27 struct lp3943 *lp3943; member in struct:lp3943_pwm 40 struct lp3943 *lp3943 = lp3943_pwm->lp3943; lp3943_pwm_request_map() local 55 if (test_and_set_bit(offset, &lp3943->pin_used)) { lp3943_pwm_request_map() 79 struct lp3943 *lp3943 = lp3943_pwm->lp3943; lp3943_pwm_free_map() local 84 clear_bit(offset, &lp3943->pin_used); lp3943_pwm_free_map() 102 struct lp3943 *lp3943 = lp3943_pwm->lp3943; lp3943_pwm_config() local 127 err = lp3943_write_byte(lp3943, reg_prescale, val); lp3943_pwm_config() 133 return lp3943_write_byte(lp3943, reg_duty, val); lp3943_pwm_config() 140 struct lp3943 *lp3943 = lp3943_pwm->lp3943; lp3943_pwm_set_mode() local 141 const struct lp3943_reg_cfg *mux = lp3943->mux_cfg; lp3943_pwm_set_mode() 146 err = lp3943_update_bits(lp3943, mux[index].reg, lp3943_pwm_set_mode() 258 struct lp3943 *lp3943 = dev_get_drvdata(pdev->dev.parent); lp3943_pwm_probe() local 266 lp3943_pwm->pdata = lp3943->pdata; lp3943_pwm_probe() 277 lp3943_pwm->lp3943 = lp3943; lp3943_pwm_probe() 297 { .compatible = "ti,lp3943-pwm", }, 307 .name = "lp3943-pwm", 314 MODULE_ALIAS("platform:lp3943-pwm");
|
/linux-4.4.14/include/linux/mfd/ |
H A D | lp3943.h | 92 * struct lp3943 103 struct lp3943 { struct 111 int lp3943_read_byte(struct lp3943 *lp3943, u8 reg, u8 *read); 112 int lp3943_write_byte(struct lp3943 *lp3943, u8 reg, u8 data); 113 int lp3943_update_bits(struct lp3943 *lp3943, u8 reg, u8 mask, u8 data);
|