Messages in this thread | | | Date | Wed, 24 May 2023 11:19:09 +0100 | From | Mark Brown <> | Subject | Re: [PATCH v11 2/2] spi: loongson: add bus driver for the loongson spi controller |
| |
On Wed, May 24, 2023 at 11:42:34AM +0300, Andy Shevchenko wrote: > On Wed, May 24, 2023 at 10:52 AM zhuyinbo <zhuyinbo@loongson.cn> wrote:
> > >> +#define LOONGSON_SPI_SPCR_REG 0x00 > > >> +#define LOONGSON_SPI_SPSR_REG 0x01 > > >> +#define LOONGSON_SPI_FIFO_REG 0x02 > > >> +#define LOONGSON_SPI_SPER_REG 0x03 > > >> +#define LOONGSON_SPI_PARA_REG 0x04 > > >> +#define LOONGSON_SPI_SFCS_REG 0x05 > > >> +#define LOONGSON_SPI_TIMI_REG 0x06
> > > Where is this used outside of the main driver?
> > These definitions are only used in core.c
> Then the obvious question, why are they located in *.h?
It's absolutely fine to put them in a header file, that's a perfectly normal way of writing code - it helps keep the driver a bit smaller by putting big piles of defines in a separate file, that can help make things a bit more manageable. [unhandled content-type:application/pgp-signature] | |