lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <241de28d-623d-4409-b1eb-9f48ec8b5252@kernel.org>
Date: Sat, 11 Jan 2025 11:28:07 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Markus Burri <markus.burri@...com>, linux-kernel@...r.kernel.org
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Marek Vasut <marex@...x.de>,
 linux-rtc@...r.kernel.org, devicetree@...r.kernel.org,
 Manuel Traut <manuel.traut@...com>
Subject: Re: [PATCH v1 6/7] rtc-rv8803: make tamper function configurable via
 sysfs

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ