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: <l4ayyscyth2zha62mrxcgkte3db53z4kqrnpvrorkq7f53wrwl@4nzqsohbzn2u>
Date: Sat, 11 Jan 2025 11:21:56 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Markus Burri <markus.burri@...com>
Cc: linux-kernel@...r.kernel.org, 
	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 3/7] rtc-rv8803: add register definitions for rv8901
 tamper detection

On Fri, Jan 10, 2025 at 07:13:57AM +0100, Markus Burri wrote:
> Add register definition and string mapping for rv8901 tamper detection.
> 
> Signed-off-by: Markus Burri <markus.burri@...com>
> 
> ---
>  drivers/rtc/rtc-rv8803.c | 122 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 122 insertions(+)
> 

There are no users of this. Don't add dead code. Probably you wanted to
add it for some usage, so add defines/structs WITH the users.

> diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
> index 50fbae9..a4f2f53 100644
> --- a/drivers/rtc/rtc-rv8803.c
> +++ b/drivers/rtc/rtc-rv8803.c
> @@ -58,6 +58,53 @@
>  #define RX8900_FLAG_SWOFF		BIT(2)
>  #define RX8900_FLAG_VDETOFF		BIT(3)
>  
> +#define RX8901_EVIN_EN			0x20
> +#define RX8901_EVIN1_CFG		0x21
> +#define RX8901_EVIN2_CFG		0x23
> +#define RX8901_EVIN3_CFG		0x25
> +#define RX8901_EVENTx_CFG_POL		GENMASK(1, 0)
> +#define RX8901_EVENTx_CFG_PUPD		GENMASK(4, 2)
> +
> +#define RX8901_EVIN1_FLT		0x22
> +#define RX8901_EVIN2_FLT		0x24
> +#define RX8901_EVIN3_FLT		0x26
> +
> +#define RX8901_BUF1_CFG1		0x27
> +#define RX8901_BUF2_CFG1		0x2A
> +#define RX8901_BUF3_CFG1		0x2D
> +
> +#define RX8901_BUF1_STAT		0x28
> +#define RX8901_BUF2_STAT		0x2B
> +#define RX8901_BUF3_STAT		0x2E
> +#define RX8901_BUFx_STAT_PTR		GENMASK(5, 0)
> +#define RX8901_BUFx_STAT_EMPTF		BIT(6)
> +#define RX8901_BUFx_STAT_FULLF		BIT(7)
> +
> +#define RX8901_BUF1_CFG2		0x29
> +#define RX8901_BUF2_CFG2		0x2C
> +#define RX8901_BUF3_CFG2		0x2F
> +
> +#define RX8901_WRCMD_CFG		0x41
> +#define RX8901_WRCMD_TRG		0x42
> +
> +#define RX8901_EVNT_INTE		0x43
> +#define RX8901_CAP_EN			0x44
> +
> +#define RX8901_BUF_INTF			0x46
> +#define RX8901_BUF_INTF_BUF1F		BIT(5)
> +
> +#define RX8901_EVNT_INTF		0x47
> +#define RX8901_EVNT_INTF_VBATLEVF	BIT(3)
> +#define RX8901_EVNT_INTF_EVIN1F		BIT(5)
> +
> +#define RX8901_BUF_OVWF			0x4F
> +
> +#define NO_OF_EVIN			3
> +
> +#define EVIN_FILTER_FACTOR		125
> +#define EVIN_FILTER_MAX			40
> +#define EV_READ_MAX_LINE_SIZE		96
> +
>  enum rv8803_type {
>  	rv_8803,
>  	rx_8803,
> @@ -66,6 +113,81 @@ enum rv8803_type {
>  	rx_8901,
>  };
>  
> +enum evin_pull_resistor {
> +	no = 0b000,
> +	pull_up_500k = 0b001,
> +	pull_up_1M = 0b010,
> +	pull_up_10M = 0b011,
> +	pull_down_500k = 0b100,
> +};
> +
> +enum evin_trigger {
> +	falling_edge = 0b00,
> +	rising_edge = 0b01,
> +	both_edges = 0b10,
> +};
> +
> +enum evin_buffer_mode {
> +	inhibit = 0,
> +	overwrite = 1,
> +};
> +
> +struct cfg_val_txt {
> +	char *txt;
> +	u8 val;
> +	bool hide;
> +};
> +
> +const struct cfg_val_txt pull_resistor_txt[] = {

Why all these are not static? Where is the header exporting these?


Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ