Re: [RFC PATCH v2 2/3] accel: add dedicated minor for accelerator devices

2022-11-06 Thread Oded Gabbay
On Sun, Nov 6, 2022 at 12:54 PM Oded Gabbay wrote: > > On Thu, Nov 3, 2022 at 7:26 AM Jiho Chu wrote: > > > > On Wed, 2 Nov 2022 22:34:04 +0200 > > Oded Gabbay wrote: > > > > > +/** > > > + * accel_open - open method for ACCEL file > > > + * @inode: device inode > > > + * @filp: file pointer.

Re: [RFC PATCH v2 2/3] accel: add dedicated minor for accelerator devices

2022-11-06 Thread Oded Gabbay
On Thu, Nov 3, 2022 at 7:26 AM Jiho Chu wrote: > > On Wed, 2 Nov 2022 22:34:04 +0200 > Oded Gabbay wrote: > > > +/** > > + * accel_open - open method for ACCEL file > > + * @inode: device inode > > + * @filp: file pointer. > > + * > > + * This function must be used by drivers as their

Re: [RFC PATCH v2 2/3] accel: add dedicated minor for accelerator devices

2022-11-06 Thread Oded Gabbay
On Wed, Nov 2, 2022 at 11:17 PM Jeffrey Hugo wrote: > > On 11/2/2022 2:34 PM, Oded Gabbay wrote: > > @@ -24,16 +33,6 @@ static char *accel_devnode(struct device *dev, umode_t > > *mode) > > > > static CLASS_ATTR_STRING(accel_version, 0444, "accel 1.0.0 20221018"); > > > > -/** > > - *

Re: [RFC PATCH v2 2/3] accel: add dedicated minor for accelerator devices

2022-11-02 Thread Jiho Chu
On Wed, 2 Nov 2022 22:34:04 +0200 Oded Gabbay wrote: > +/** > + * accel_open - open method for ACCEL file > + * @inode: device inode > + * @filp: file pointer. > + * > + * This function must be used by drivers as their _operations.open > method. > + * It looks up the correct ACCEL device and

Re: [RFC PATCH v2 2/3] accel: add dedicated minor for accelerator devices

2022-11-02 Thread Jeffrey Hugo
On 11/2/2022 2:34 PM, Oded Gabbay wrote: @@ -24,16 +33,6 @@ static char *accel_devnode(struct device *dev, umode_t *mode) static CLASS_ATTR_STRING(accel_version, 0444, "accel 1.0.0 20221018"); -/** - * accel_sysfs_init - initialize sysfs helpers - * - * This is used to create the ACCEL

[RFC PATCH v2 2/3] accel: add dedicated minor for accelerator devices

2022-11-02 Thread Oded Gabbay
The accelerator devices are exposed to user-space using a dedicated major. In addition, they are represented in /dev with new, dedicated device char names: /dev/accel/accel*. This is done to make sure any user-space software that tries to open a graphic card won't open the accelerator device by