Re: [PATCH v5 2/8] i2c: piix4: Move i2c_piix4 macros and structures to common header

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

 



On Fri, Sep 13, 2024 at 05:41:04PM +0530, Shyam Sundar S K wrote:
> Add a separate header file to relocate the common code from the i2c_piix4
> driver, allowing the AMD ASF driver to utilize the same code.
> 
> Update the MAINTAINERS file to include information about the new common
> header file.

...

> +/* PIIX4 SMBus address offsets */
> +#define SMBHSTSTS	(0 + piix4_smba)
> +#define SMBHSLVSTS	(1 + piix4_smba)
> +#define SMBHSTCNT	(2 + piix4_smba)
> +#define SMBHSTCMD	(3 + piix4_smba)
> +#define SMBHSTADD	(4 + piix4_smba)
> +#define SMBHSTDAT0	(5 + piix4_smba)
> +#define SMBHSTDAT1	(6 + piix4_smba)
> +#define SMBBLKDAT	(7 + piix4_smba)
> +#define SMBSLVCNT	(8 + piix4_smba)
> +#define SMBSHDWCMD	(9 + piix4_smba)

While at it, I would suggest to use fixed-width values for all of them, e.g.,

#define SMBHSTADD	(0x4 + piix4_smba)

> +#define SMBSLVEVT	(0xA + piix4_smba)
> +#define SMBSLVDAT	(0xC + piix4_smba)

...

> +struct sb800_mmio_cfg {
> +	void __iomem *addr;
> +	bool use_mmio;

These two need types.h.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux