Re: [PATCH v1 6/7] rtc-rv8803: make tamper function configurable via sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux