Skip to content

Commit 0b24dfa

Browse files
konradybciobroonie
authored andcommitted
regulator: slg51000: Wait after asserting CS pin
Sony's downstream driver [1], among some other changes, adds a seemingly random 10ms usleep_range, which turned out to be necessary for the hardware to function properly on at least Sony Xperia 1 IV. Without this, I2C transactions with the SLG51000 straight up fail. Relax (10-10ms -> 10-11ms) and add the aforementioned sleep to make sure the hardware has some time to wake up. (nagara-2.0.0-mlc/vendor/semc/hardware/camera-kernel-module/) [1] https://developer.sony.com/file/download/open-source-archive-for-64-0-m-4-29/ Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20221118131035.54874-1-konrad.dybcio@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 1f386d6 commit 0b24dfa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/regulator/slg51000-regulator.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ static int slg51000_i2c_probe(struct i2c_client *client)
457457
chip->cs_gpiod = cs_gpiod;
458458
}
459459

460+
usleep_range(10000, 11000);
461+
460462
i2c_set_clientdata(client, chip);
461463
chip->chip_irq = client->irq;
462464
chip->dev = dev;

0 commit comments

Comments
 (0)