From: Hans de Goede <hdegoede@redhat.com>
To: "Joel Selvaraj" <joelselvaraj.oss@gmail.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v3 3/3] Input: novatek-nvt-ts: add support for NT36672A touchscreen
Date: Sat, 1 Jun 2024 16:07:01 +0200 [thread overview]
Message-ID: <cbc86440-5065-448d-b83c-83602de6651c@redhat.com> (raw)
In-Reply-To: <a2f68c56-e6d6-4626-8d05-b5e808da60da@gmail.com>
Hi,
On 6/1/24 2:10 AM, Joel Selvaraj wrote:
> Hi Hans de Goede,
>
> On 5/27/24 03:42, Hans de Goede wrote:
>> Hi Joel,
>>
>> On 5/27/24 5:26 AM, Joel Selvaraj via B4 Relay wrote:
>>> From: Joel Selvaraj <joelselvaraj.oss@gmail.com>
>>>
>>> ---
>>> drivers/input/touchscreen/novatek-nvt-ts.c | 78 +++++++++++++++++++++++++++---
>>> 1 file changed, 72 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/input/touchscreen/novatek-nvt-ts.c b/drivers/input/touchscreen/novatek-nvt-ts.c
>>> index 224fd112b25a9..7a82a1b09f9d5 100644
>>> --- a/drivers/input/touchscreen/novatek-nvt-ts.c
>>> +++ b/drivers/input/touchscreen/novatek-nvt-ts.c
>>> @@ -139,9 +143,23 @@ static irqreturn_t nvt_ts_irq(int irq, void *dev_id)
>>> return IRQ_HANDLED;
>>> }
>>> +static void nvt_ts_disable_regulators(void *_data)
>>> +{
>>> + struct nvt_ts_data *data = _data;
>>> +
>>> + regulator_bulk_disable(ARRAY_SIZE(data->regulators), data->regulators);
>>> +}
>>> +
>>> static int nvt_ts_start(struct input_dev *dev)
>>> {
>>> struct nvt_ts_data *data = input_get_drvdata(dev);
>>> + int error;
>>> +
>>> + error = regulator_bulk_enable(ARRAY_SIZE(data->regulators), data->regulators);
>>> + if (error) {
>>> + dev_err(&data->client->dev, "failed to enable regulators\n");
>>> + return error;
>>> + }
>>>
>>
>> This is weird, you already enable the regulators in probe() and
>> those get disabled again on remove() by the devm action you add.
>>
>> So there is no need to enable / disable the regulators on start/stop .
>>
>> If you want the regulators to only be enabled when the touchscreen
>> is on then you should disable the regulators again in probe()
>> after the nvt_ts_read_data() call there (and drop the devm action).
>
> Yes, I want the regulators to be enabled only when the touchscreen is on/active. I will disable the regulators in probe and remove the devm action in v4.
Sounds good.
It is great to see people working on getting mainline
kernels to work on phones like the work you are doing here.
Thank you for doing this work!
Regards,
Hans
next prev parent reply other threads:[~2024-06-01 14:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 3:26 [PATCH v3 0/3] " Joel Selvaraj via B4 Relay
2024-05-27 3:26 ` [PATCH v3 1/3] Input: novatek-nvt-ts: replace generic i2c device id with specific IC variant Joel Selvaraj via B4 Relay
2024-05-27 7:53 ` Hans de Goede
2024-05-27 3:26 ` [PATCH v3 2/3] dt-bindings: input: document Novatek NVT touchscreen controller Joel Selvaraj via B4 Relay
2024-05-27 3:26 ` [PATCH v3 3/3] Input: novatek-nvt-ts: add support for NT36672A touchscreen Joel Selvaraj via B4 Relay
2024-05-27 8:42 ` Hans de Goede
2024-06-01 0:10 ` Joel Selvaraj
2024-06-01 14:07 ` Hans de Goede [this message]
2024-06-01 15:08 ` Joel Selvaraj
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=cbc86440-5065-448d-b83c-83602de6651c@redhat.com \
--to=hdegoede@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=joelselvaraj.oss@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--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
all inboxes | Powered by JetHome®