public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Markus Burri <markus.burri@mt.com>, linux-kernel@vger.kernel.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Marek Vasut <marex@denx.de>,
	linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
	Manuel Traut <manuel.traut@mt.com>
Subject: Re: [PATCH v1 6/7] rtc-rv8803: make tamper function configurable via sysfs
Date: Sat, 11 Jan 2025 11:28:07 +0100	[thread overview]
Message-ID: <241de28d-623d-4409-b1eb-9f48ec8b5252@kernel.org> (raw)
In-Reply-To: <20250110061401.358371-7-markus.burri@mt.com>

On 10/01/2025 07:14, Markus Burri wrote:
>  static int rv8803_ts_event_write_evin(int evin, struct rv8803_data *rv8803, int pullup_down,
>  				      int trigger, int filter)
>  {
> @@ -719,6 +744,31 @@ static int rv8803_ts_event_write_evin(int evin, struct rv8803_data *rv8803, int
>  	return 0;
>  }
>  
> +static int rv8803_ts_event_read_evin(int evin, struct rv8803_data *rv8803,
> +				     int *pullup_down, int *trigger, int *filter)
> +
> +{
> +	int ret;
> +	struct i2c_client *client = rv8803->client;
> +
> +	/* get EVENTx pull-up edge trigger */
> +	ret = rv8803_read_reg(client, evin_cfg_reg[evin]);
> +	if (ret < 0)
> +		return ret;
> +
> +	*pullup_down = FIELD_GET(RX8901_EVENTx_CFG_PUPD, ret);
> +	*trigger = FIELD_GET(RX8901_EVENTx_CFG_POL, ret);

No. pinctrl is not done via sysfs, please do not re-invent existing
APIs. You must use proper pinctrl subsystem for this.

Best regards,
Krzysztof

  reply	other threads:[~2025-01-11 10:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10  6:13 [PATCH v1 0/7] rtc-rv8803: Implement timestamp trigger over event pins Markus Burri
2025-01-10  6:13 ` [PATCH v1 1/7] dt-bindings: rtc: add new type for epson,rx8901 Markus Burri
2025-01-11 10:20   ` Krzysztof Kozlowski
2025-01-11 10:26     ` Krzysztof Kozlowski
2025-01-10  6:13 ` [PATCH v1 2/7] rtc-rv8803: add new type for rv8901 Markus Burri
2025-01-10  6:13 ` [PATCH v1 3/7] rtc-rv8803: add register definitions for rv8901 tamper detection Markus Burri
2025-01-11 10:21   ` Krzysztof Kozlowski
2025-01-12  4:52   ` kernel test robot
2025-01-10  6:13 ` [PATCH v1 4/7] rtc-rv8803: add tamper function to sysfs for rv8901 Markus Burri
2025-01-11 10:24   ` Krzysztof Kozlowski
2025-01-10  6:13 ` [PATCH v1 5/7] rtc-rv8803: extend sysfs to trigger internal ts-event Markus Burri
2025-01-11 10:24   ` Krzysztof Kozlowski
2025-01-10  6:14 ` [PATCH v1 6/7] rtc-rv8803: make tamper function configurable via sysfs Markus Burri
2025-01-11 10:28   ` Krzysztof Kozlowski [this message]
2025-01-10  6:14 ` [PATCH v1 7/7] rtc-rv8803: extend sysfs to read ts-event and buffer status Markus Burri

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=241de28d-623d-4409-b1eb-9f48ec8b5252@kernel.org \
    --to=krzk@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=manuel.traut@mt.com \
    --cc=marex@denx.de \
    --cc=markus.burri@mt.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