RE: [PATCH net-next v2 1/2] driver core: auxiliary bus: show auxiliary device IRQs

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

 



> From: Shay Drori <shayd@xxxxxxxxxx>
> Sent: Sunday, May 5, 2024 7:53 AM


> diff --git a/include/linux/auxiliary_bus.h b/include/linux/auxiliary_bus.h
> index de21d9d24a95..fe2c438c0217 100644
> --- a/include/linux/auxiliary_bus.h
> +++ b/include/linux/auxiliary_bus.h
> @@ -58,6 +58,9 @@
>   *       in
>   * @name: Match name found by the auxiliary device driver,
>   * @id: unique identitier if multiple devices of the same name are exported,
> + * @irqs: irqs xarray contains irq indices which are used by the
> + device,
> + * @groups: first group is for irqs sysfs directory; it is a NULL terminated
> + *          array,
>   *
>   * An auxiliary_device represents a part of its parent device's functionality.
>   * It is given a name that, combined with the registering drivers @@ -138,6
> +141,8 @@  struct auxiliary_device {
>  	struct device dev;
>  	const char *name;
> +	struct xarray irqs;
> +	const struct attribute_group *groups[2];
>  	u32 id;
>  };
> 
> @@ -209,8 +214,19 @@ static inline struct auxiliary_driver
> *to_auxiliary_drv(struct device_driver *dr  }
> 
>  int auxiliary_device_init(struct auxiliary_device *auxdev); -int
> __auxiliary_device_add(struct auxiliary_device *auxdev, const char
> *modname); -#define auxiliary_device_add(auxdev)
> __auxiliary_device_add(auxdev, KBUILD_MODNAME)
> +int __auxiliary_device_add(struct auxiliary_device *auxdev, const char
> *modname,
> +			   bool irqs_sysfs_enable);
> +#define auxiliary_device_add(auxdev) __auxiliary_device_add(auxdev,
> +KBUILD_MODNAME, false) #define auxiliary_device_add_with_irqs(auxdev)
> \
> +	__auxiliary_device_add(auxdev, KBUILD_MODNAME, true)
> +

> +#ifdef CONFIG_SYSFS
> +int auxiliary_device_sysfs_irq_add(struct auxiliary_device *auxdev, int
> +irq); void auxiliary_device_sysfs_irq_remove(struct auxiliary_device
> +*auxdev, int irq); #else /* CONFIG_SYSFS */ int
> +auxiliary_device_sysfs_irq_add(struct auxiliary_device *auxdev, int
> +irq) {return 0; } void auxiliary_device_sysfs_irq_remove(struct
> +auxiliary_device *auxdev, int irq) {} #endif
>
Above definitions need to be static inline and should under 80 characters.
Please fix them.





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux