[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250117-chubby-convivial-axolotl-29e2df@krzk-bin>
Date: Fri, 17 Jan 2025 09:01:26 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Dzmitry Sankouski <dsankouski@...il.com>
Cc: Sebastian Reichel <sre@...nel.org>,
Chanwoo Choi <cw00.choi@...sung.com>, Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Dmitry Torokhov <dmitry.torokhov@...il.com>,
Pavel Machek <pavel@....cz>, Hans de Goede <hdegoede@...hat.com>,
Marek Szyprowski <m.szyprowski@...sung.com>, Sebastian Krzyszkowiak <sebastian.krzyszkowiak@...i.sm>,
Purism Kernel Team <kernel@...i.sm>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-input@...r.kernel.org, linux-leds@...r.kernel.org
Subject: Re: [PATCH v15 6/7] input: max77693: add max77705 haptic support
On Thu, Jan 16, 2025 at 07:26:08PM +0300, Dzmitry Sankouski wrote:
> #define MAX_MAGNITUDE_SHIFT 16
> @@ -115,6 +116,13 @@ static int max77693_haptic_configure(struct max77693_haptic *haptic,
> MAX77693_HAPTIC_PWM_DIVISOR_128);
> config_reg = MAX77693_HAPTIC_REG_CONFIG2;
> break;
> + case TYPE_MAX77705:
> + value = ((haptic->type << MAX77693_CONFIG2_MODE) |
> + (enable << MAX77693_CONFIG2_MEN) |
> + (haptic->mode << MAX77693_CONFIG2_HTYP) |
> + MAX77693_HAPTIC_PWM_DIVISOR_128);
That's the same as previous one, why duplicating?
> + config_reg = MAX77705_PMIC_REG_MCONFIG;
> + break;
> case TYPE_MAX77843:
> value = (haptic->type << MCONFIG_MODE_SHIFT) |
> (enable << MCONFIG_MEN_SHIFT) |
> @@ -312,6 +320,9 @@ static int max77693_haptic_probe(struct platform_device *pdev)
> case TYPE_MAX77693:
> haptic->regmap_haptic = max77693->regmap_haptic;
> break;
> + case TYPE_MAX77705:
> + haptic->regmap_haptic = max77693->regmap;
> + break;
Drop these two above.
> case TYPE_MAX77843:
> haptic->regmap_haptic = max77693->regmap;
> break;
> @@ -407,6 +418,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(max77693_haptic_pm_ops,
>
> static const struct platform_device_id max77693_haptic_id[] = {
> { "max77693-haptic", },
> + { "max77705-haptic", },
> { "max77843-haptic", },
> {},
> };
> @@ -414,6 +426,7 @@ MODULE_DEVICE_TABLE(platform, max77693_haptic_id);
>
> static const struct of_device_id of_max77693_haptic_dt_match[] = {
> { .compatible = "maxim,max77693-haptic", },
> + { .compatible = "maxim,max77705-haptic", },
So the device looks fully compatible with max77693. Drop this change and
express compatibility with fallback.
Best regards,
Krzysztof
Powered by blists - more mailing lists