tps65217_bl 35 drivers/video/backlight/tps65217_bl.c static int tps65217_bl_enable(struct tps65217_bl *tps65217_bl) tps65217_bl 39 drivers/video/backlight/tps65217_bl.c rc = tps65217_set_bits(tps65217_bl->tps, TPS65217_REG_WLEDCTRL1, tps65217_bl 43 drivers/video/backlight/tps65217_bl.c dev_err(tps65217_bl->dev, tps65217_bl 48 drivers/video/backlight/tps65217_bl.c tps65217_bl->is_enabled = true; tps65217_bl 50 drivers/video/backlight/tps65217_bl.c dev_dbg(tps65217_bl->dev, "backlight enabled\n"); tps65217_bl 55 drivers/video/backlight/tps65217_bl.c static int tps65217_bl_disable(struct tps65217_bl *tps65217_bl) tps65217_bl 59 drivers/video/backlight/tps65217_bl.c rc = tps65217_clear_bits(tps65217_bl->tps, tps65217_bl 64 drivers/video/backlight/tps65217_bl.c dev_err(tps65217_bl->dev, tps65217_bl 69 drivers/video/backlight/tps65217_bl.c tps65217_bl->is_enabled = false; tps65217_bl 71 drivers/video/backlight/tps65217_bl.c dev_dbg(tps65217_bl->dev, "backlight disabled\n"); tps65217_bl 78 drivers/video/backlight/tps65217_bl.c struct tps65217_bl *tps65217_bl = bl_get_data(bl); tps65217_bl 91 drivers/video/backlight/tps65217_bl.c rc = tps65217_reg_write(tps65217_bl->tps, tps65217_bl 96 drivers/video/backlight/tps65217_bl.c dev_err(tps65217_bl->dev, tps65217_bl 101 drivers/video/backlight/tps65217_bl.c dev_dbg(tps65217_bl->dev, "brightness set to %d\n", brightness); tps65217_bl 103 drivers/video/backlight/tps65217_bl.c if (!tps65217_bl->is_enabled) tps65217_bl 104 drivers/video/backlight/tps65217_bl.c rc = tps65217_bl_enable(tps65217_bl); tps65217_bl 106 drivers/video/backlight/tps65217_bl.c rc = tps65217_bl_disable(tps65217_bl); tps65217_bl 117 drivers/video/backlight/tps65217_bl.c static int tps65217_bl_hw_init(struct tps65217_bl *tps65217_bl, tps65217_bl 122 drivers/video/backlight/tps65217_bl.c rc = tps65217_bl_disable(tps65217_bl); tps65217_bl 129 drivers/video/backlight/tps65217_bl.c rc = tps65217_clear_bits(tps65217_bl->tps, tps65217_bl 134 drivers/video/backlight/tps65217_bl.c dev_err(tps65217_bl->dev, tps65217_bl 140 drivers/video/backlight/tps65217_bl.c dev_dbg(tps65217_bl->dev, "selected ISET1 current level\n"); tps65217_bl 146 drivers/video/backlight/tps65217_bl.c rc = tps65217_set_bits(tps65217_bl->tps, TPS65217_REG_WLEDCTRL1, tps65217_bl 150 drivers/video/backlight/tps65217_bl.c dev_err(tps65217_bl->dev, tps65217_bl 156 drivers/video/backlight/tps65217_bl.c dev_dbg(tps65217_bl->dev, "selected ISET2 current level\n"); tps65217_bl 161 drivers/video/backlight/tps65217_bl.c dev_err(tps65217_bl->dev, tps65217_bl 167 drivers/video/backlight/tps65217_bl.c rc = tps65217_set_bits(tps65217_bl->tps, tps65217_bl 173 drivers/video/backlight/tps65217_bl.c dev_err(tps65217_bl->dev, tps65217_bl 273 drivers/video/backlight/tps65217_bl.c struct tps65217_bl *tps65217_bl; tps65217_bl 281 drivers/video/backlight/tps65217_bl.c tps65217_bl = devm_kzalloc(&pdev->dev, sizeof(*tps65217_bl), tps65217_bl 283 drivers/video/backlight/tps65217_bl.c if (tps65217_bl == NULL) tps65217_bl 286 drivers/video/backlight/tps65217_bl.c tps65217_bl->tps = tps; tps65217_bl 287 drivers/video/backlight/tps65217_bl.c tps65217_bl->dev = &pdev->dev; tps65217_bl 288 drivers/video/backlight/tps65217_bl.c tps65217_bl->is_enabled = false; tps65217_bl 290 drivers/video/backlight/tps65217_bl.c rc = tps65217_bl_hw_init(tps65217_bl, pdata); tps65217_bl 298 drivers/video/backlight/tps65217_bl.c tps65217_bl->bl = devm_backlight_device_register(&pdev->dev, pdev->name, tps65217_bl 299 drivers/video/backlight/tps65217_bl.c tps65217_bl->dev, tps65217_bl, tps65217_bl 301 drivers/video/backlight/tps65217_bl.c if (IS_ERR(tps65217_bl->bl)) { tps65217_bl 302 drivers/video/backlight/tps65217_bl.c dev_err(tps65217_bl->dev, tps65217_bl 304 drivers/video/backlight/tps65217_bl.c return PTR_ERR(tps65217_bl->bl); tps65217_bl 307 drivers/video/backlight/tps65217_bl.c tps65217_bl->bl->props.brightness = pdata->dft_brightness; tps65217_bl 308 drivers/video/backlight/tps65217_bl.c backlight_update_status(tps65217_bl->bl); tps65217_bl 309 drivers/video/backlight/tps65217_bl.c platform_set_drvdata(pdev, tps65217_bl);