From: "Alexey Klimov" <alexey.klimov@linaro.org>
To: "Griffin Kroah-Hartman" <griffin.kroah@fairphone.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Luca Weiss" <luca.weiss@fairphone.com>
Cc: <linux-input@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCH 2/3] Input: aw86927 - add driver for Awinic AW86927
Date: Wed, 06 Aug 2025 16:28:54 +0100 [thread overview]
Message-ID: <DBVG9ID1KS59.27QTXCZOWJVNM@linaro.org> (raw)
In-Reply-To: <20250806-aw86927-v1-2-23d8a6d0f2b2@fairphone.com>
Hi Griffin,
On Wed Aug 6, 2025 at 4:10 PM BST, Griffin Kroah-Hartman wrote:
> Add support for the I2C-connected Awinic AW86927 LRA haptic driver.
>
> This driver includes a hardcoded sine waveform to be uploaded to the
> AW86927's SRAM for haptic playback.
> This driver does not currently support all the capabilities of the
> AW86927, such as F0 calibration, RTP mode, and CONT mode.
>
> Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
> ---
> drivers/input/misc/Kconfig | 11 +
> drivers/input/misc/Makefile | 1 +
> drivers/input/misc/aw86927.c | 841 +++++++++++++++++++++++++++++++++++++++++++
[...]
> +static int aw86927_probe(struct i2c_client *client)
> +{
> + struct aw86927_data *haptics;
> + unsigned int read_buf;
> + int err;
> +
> + haptics = devm_kzalloc(&client->dev, sizeof(struct aw86927_data), GFP_KERNEL);
> + if (!haptics)
> + return -ENOMEM;
> +
> + haptics->dev = &client->dev;
> + haptics->client = client;
> +
> + i2c_set_clientdata(client, haptics);
> + dev_set_drvdata(&client->dev, haptics);
> +
> + haptics->regmap = devm_regmap_init_i2c(client, &aw86927_regmap_config);
> + if (IS_ERR(haptics->regmap))
> + return dev_err_probe(haptics->dev, PTR_ERR(haptics->regmap),
> + "Failed to allocate register map\n");
> +
> + haptics->input_dev = devm_input_allocate_device(haptics->dev);
> + if (!haptics->input_dev)
> + return -ENOMEM;
> +
> + haptics->reset_gpio = devm_gpiod_get(haptics->dev, "reset", GPIOD_OUT_HIGH);
> + if (IS_ERR(haptics->reset_gpio))
> + return dev_err_probe(haptics->dev, PTR_ERR(haptics->reset_gpio),
> + "Failed to get reset gpio\n");
> +
> + /* Hardware reset */
> + aw86927_hw_reset(haptics);
> +
> + /* Software reset */
> + err = regmap_write(haptics->regmap, AW86927_RSTCFG, AW86927_RSTCFG_SOFTRST);
> + if (err)
> + return dev_err_probe(haptics->dev, PTR_ERR(haptics->regmap),
> + "Failed Software reset\n");
> +
> + /* Wait ~3s until I2C is accessible */
> + usleep_range(3000, 3500);
3 ms or 3 seconds?
[..]
Best regards,
Alexey
next prev parent reply other threads:[~2025-08-06 15:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 15:10 [PATCH 0/3] Add support for Awinic AW86927 haptic driver Griffin Kroah-Hartman
2025-08-06 15:10 ` [PATCH 1/3] dt-bindings: input: Add bindings for Awinic AW86927 Griffin Kroah-Hartman
2025-08-07 0:08 ` Rob Herring
2025-08-06 15:10 ` [PATCH 2/3] Input: aw86927 - add driver " Griffin Kroah-Hartman
2025-08-06 15:28 ` Alexey Klimov [this message]
2025-08-06 15:10 ` [PATCH 3/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add vibrator support Griffin Kroah-Hartman
2025-08-06 15:13 ` Konrad Dybcio
2025-08-06 15:20 ` Luca Weiss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DBVG9ID1KS59.27QTXCZOWJVNM@linaro.org \
--to=alexey.klimov@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=griffin.kroah@fairphone.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).