Re: [PATCH v2] mfd: ntxec: Support for EC in Tolino Shine 2 HD

From: Jonathan Neuschäfer
Date: Mon Mar 08 2021 - 17:08:26 EST


On Mon, Mar 08, 2021 at 10:29:52PM +0100, Andreas Kemnade wrote:
> Add the version of the EC in the Tolino Shine 2 HD
> to the supported versions. It seems not to have an RTC
> and does not ack data written to it.
> The vendor kernel happily ignores write errors, using
> I2C via userspace i2c-set also shows the error.
> So add a quirk to ignore that error.
>
> PWM can be successfully configured despite of that error.
>
> Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
> ---
[...]
> ec = devm_kmalloc(&client->dev, sizeof(*ec), GFP_KERNEL);
> @@ -137,6 +174,16 @@ static int ntxec_probe(struct i2c_client *client)
> /* Bail out if we encounter an unknown firmware version */
> switch (version) {
> case NTXEC_VERSION_KOBO_AURA:
> + has_rtc = true;
> + break;
> + case NTXEC_VERSION_TOLINO_SHINE2:
> + has_rtc = false;
> + /* Another regmap stacked on top of the other */

"[...] on top of the first", perhaps

> + ec->regmap = devm_regmap_init(ec->dev, NULL,
> + ec->regmap,
> + &regmap_config_noack);
> + if (IS_ERR(ec->regmap))
> + return PTR_ERR(ec->regmap);

In any case,

Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@xxxxxxx>

Attachment: signature.asc
Description: PGP signature