Re: [PATCH V3 1/2] soc/tegra: fuse: Add custom SoC attributes
From: Thierry Reding
Date: Tue Apr 21 2020 - 18:15:43 EST
On Fri, Apr 17, 2020 at 01:39:48PM +0100, Jon Hunter wrote:
> Add a custom SoC attribute for Tegra to expose the HIDREV register
> fields to userspace via the sysfs. This register provides additional
> details about the type of device (eg, silicon, FPGA, etc) as well as
> revision. Exposing this information is useful for identifying the
> exact device revision and device type.
>
> For Tegra devices up until Tegra186, the majorrev and minorrev fields of
> the HIDREV register are used to determine the device revision and device
> type. For Tegra194, the majorrev and minorrev fields only determine the
> revision. Starting with Tegra194, there is an additional field,
> pre_si_platform (which occupies bits 20-23), that now determines device
> type. Therefore, for all Tegra devices, add a custom SoC attribute for
> the majorrev and minorrev fields and for Tegra194 add an additional
> attribute for the pre_si_platform field.
>
> Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx>
> ---
> Changes since V2:
> - Renamed attributes
> - Fix checkpatch warnings
> - Simplified code by using DEVICE_ATTR_RO
>
> Changes since V1:
> - Exported individual fields of the HIDREV register
>
> drivers/soc/tegra/fuse/fuse-tegra.c | 54 ++++++++++++++++++++++++++
> drivers/soc/tegra/fuse/fuse-tegra20.c | 1 +
> drivers/soc/tegra/fuse/fuse-tegra30.c | 6 +++
> drivers/soc/tegra/fuse/fuse.h | 8 ++++
> drivers/soc/tegra/fuse/tegra-apbmisc.c | 10 +++++
> 5 files changed, 79 insertions(+)
Applied, thanks.
Thierry
Attachment:
signature.asc
Description: PGP signature