[PATCH v5 1/3] fpga: xilinx-spi: extract a common driver core
Charles Perry
charles.perry at savoirfairelinux.com
Tue Mar 19 06:18:14 PDT 2024
On Mar 19, 2024, at 12:20 AM, Xu Yilun yilun.xu at linux.intel.com wrote:
>> +/**
>> + * struct xilinx_fpga_core - interface between the driver and the core manager
>> + * of Xilinx 7 Series FPGA manager
>> + * @dev: device node
>> + * @write: write callback of the driver
>> + * @prog_b: PROGRAM_B gpio descriptor
>> + * @init_b: INIT_B gpio descriptor
>> + * @done: DONE gpio descriptor
>
> Please re-check the Documentation again:
> "Structure fields that are inside a private: area are not listed in the
> generated output documentation"
>
I did generate the documentation for that struct and saw that the
private fields are indeed removed. This hinted me into thinking that
I should keep the private kernel-doc, because it's the generator job
to remove those. Looking again at the kernel-doc.rst example on that
topic, I understand that this is not the case, will fix.
>> + */
>> +struct xilinx_fpga_core {
>> +/* public: */
>> + struct device *dev;
>> + int (*write)(struct xilinx_fpga_core *core, const char *buf,
>> + size_t count);
>> +/* private: handled by xilinx-core */
>> + struct gpio_desc *prog_b;
>> + struct gpio_desc *init_b;
>> + struct gpio_desc *done;
>> +};
>> +
> [...]
>> -
>> static int xilinx_spi_probe(struct spi_device *spi)
>> {
>> - struct xilinx_spi_conf *conf;
>> - struct fpga_manager *mgr;
>> + struct xilinx_fpga_core *conf;
>
> Why do you name it conf? Maybe "core" is better?
>
> Thanks,
> Yilun
Yes, I changed the type but not the name.
Thank you for the review,
Charles
More information about the linux-arm-kernel
mailing list