Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23301b7f authored by Kim, Milo's avatar Kim, Milo Committed by Bryan Wu
Browse files

leds-lp5523: turn off the LED engines on unloading the driver



The LP5523 has 3 engines which are used for running LED patterns.
These engines should be off while unloading the driver.
Obviously, LP5523 platform data are used for releasing the resource
such like enable()/release_resource(), but these are not mandatory.
Therefore this patch is required without the platform data dependency.

Signed-off-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: default avatarBryan Wu <bryan.wu@canonical.com>
parent e0e02160
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -997,6 +997,9 @@ static int lp5523_remove(struct i2c_client *client)
	struct lp5523_chip *chip = i2c_get_clientdata(client);
	int i;

	/* Disable engine mode */
	lp5523_write(client, LP5523_REG_OP_MODE, LP5523_CMD_DISABLED);

	lp5523_unregister_sysfs(client);

	for (i = 0; i < chip->num_leds; i++) {