Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-08 Thread Sinan Kaya
Hi, On 3/8/2016 12:07 AM, Sinan Kaya wrote: > On 3/7/2016 11:46 PM, Eric Auger wrote: >>> #define module_vfio_reset_handler(compat, acpihid, reset) \ MODULE_ALIAS("vfio-reset: dt: " compat); \ MODULE_ALIAS("vfio-reset: acpi: " acpihid); \ >> My gut feeling is we must not create a dummy

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-08 Thread Sinan Kaya
Hi, On 3/8/2016 12:07 AM, Sinan Kaya wrote: > On 3/7/2016 11:46 PM, Eric Auger wrote: >>> #define module_vfio_reset_handler(compat, acpihid, reset) \ MODULE_ALIAS("vfio-reset: dt: " compat); \ MODULE_ALIAS("vfio-reset: acpi: " acpihid); \ >> My gut feeling is we must not create a dummy

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-07 Thread Sinan Kaya
On 3/7/2016 11:46 PM, Eric Auger wrote: >> #define module_vfio_reset_handler(compat, acpihid, reset) \ >> > MODULE_ALIAS("vfio-reset: dt: " compat); \ >> > MODULE_ALIAS("vfio-reset: acpi: " acpihid); \ > My gut feeling is we must not create a dummy alias when the mode > (dt/acpi) is not

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-07 Thread Sinan Kaya
On 3/7/2016 11:46 PM, Eric Auger wrote: >> #define module_vfio_reset_handler(compat, acpihid, reset) \ >> > MODULE_ALIAS("vfio-reset: dt: " compat); \ >> > MODULE_ALIAS("vfio-reset: acpi: " acpihid); \ > My gut feeling is we must not create a dummy alias when the mode > (dt/acpi) is not

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-07 Thread Eric Auger
Hi Sinan, On 03/07/2016 04:30 PM, Sinan Kaya wrote: > On 3/6/2016 11:09 PM, Eric Auger wrote: >>> #define module_vfio_reset_handler(compat, acpihid, reset) \ MODULE_ALIAS("vfio-reset:" acpihid? acpihid: compat); \ This way, we'll create an alias

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-07 Thread Eric Auger
Hi Sinan, On 03/07/2016 04:30 PM, Sinan Kaya wrote: > On 3/6/2016 11:09 PM, Eric Auger wrote: >>> #define module_vfio_reset_handler(compat, acpihid, reset) \ MODULE_ALIAS("vfio-reset:" acpihid? acpihid: compat); \ This way, we'll create an alias

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-07 Thread Sinan Kaya
On 3/6/2016 11:09 PM, Eric Auger wrote: >> #define module_vfio_reset_handler(compat, acpihid, reset)\ >> > MODULE_ALIAS("vfio-reset:" acpihid? acpihid: compat); >> > \ >> > >> > This way, we'll create an alias with one of the provided strings. > What if you

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-07 Thread Sinan Kaya
On 3/6/2016 11:09 PM, Eric Auger wrote: >> #define module_vfio_reset_handler(compat, acpihid, reset)\ >> > MODULE_ALIAS("vfio-reset:" acpihid? acpihid: compat); >> > \ >> > >> > This way, we'll create an alias with one of the provided strings. > What if you

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-06 Thread Eric Auger
Hi Sinan, On 03/04/2016 06:20 AM, Sinan Kaya wrote: > On 3/3/2016 6:14 PM, Eric Auger wrote: >> Hi Sinan, >> On 03/02/2016 07:34 PM, Sinan Kaya wrote: >>> On 2/26/2016 12:15 PM, Eric Auger wrote: > -module_init(reset ## _module_init); \ >> +#define

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-06 Thread Eric Auger
Hi Sinan, On 03/04/2016 06:20 AM, Sinan Kaya wrote: > On 3/3/2016 6:14 PM, Eric Auger wrote: >> Hi Sinan, >> On 03/02/2016 07:34 PM, Sinan Kaya wrote: >>> On 2/26/2016 12:15 PM, Eric Auger wrote: > -module_init(reset ## _module_init); \ >> +#define

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-03 Thread Sinan Kaya
On 3/3/2016 6:14 PM, Eric Auger wrote: > Hi Sinan, > On 03/02/2016 07:34 PM, Sinan Kaya wrote: >> On 2/26/2016 12:15 PM, Eric Auger wrote: -module_init(reset ## _module_init); \ > +#define module_vfio_reset_handler(compat, acpihid, reset)

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-03 Thread Sinan Kaya
On 3/3/2016 6:14 PM, Eric Auger wrote: > Hi Sinan, > On 03/02/2016 07:34 PM, Sinan Kaya wrote: >> On 2/26/2016 12:15 PM, Eric Auger wrote: -module_init(reset ## _module_init); \ > +#define module_vfio_reset_handler(compat, acpihid, reset)

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-03 Thread Eric Auger
Hi Sinan, On 03/02/2016 07:34 PM, Sinan Kaya wrote: > On 2/26/2016 12:15 PM, Eric Auger wrote: >>> -module_init(reset ## _module_init);\ +#define module_vfio_reset_handler(compat, acpihid, reset) \ +MODULE_ALIAS("vfio-reset:" compat);

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-03 Thread Eric Auger
Hi Sinan, On 03/02/2016 07:34 PM, Sinan Kaya wrote: > On 2/26/2016 12:15 PM, Eric Auger wrote: >>> -module_init(reset ## _module_init);\ +#define module_vfio_reset_handler(compat, acpihid, reset) \ +MODULE_ALIAS("vfio-reset:" compat);

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-02 Thread Sinan Kaya
On 2/26/2016 12:15 PM, Eric Auger wrote: >> -module_init(reset ## _module_init); \ >> > +#define module_vfio_reset_handler(compat, acpihid, reset) \ >> > +MODULE_ALIAS("vfio-reset:" compat); >> > \ > Here you need to handle

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-03-02 Thread Sinan Kaya
On 2/26/2016 12:15 PM, Eric Auger wrote: >> -module_init(reset ## _module_init); \ >> > +#define module_vfio_reset_handler(compat, acpihid, reset) \ >> > +MODULE_ALIAS("vfio-reset:" compat); >> > \ > Here you need to handle

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-02-26 Thread Sinan Kaya
>> +#ifdef CONFIG_ACPI >> +int vfio_platform_probe_acpi(struct vfio_platform_device *vdev, >> + struct device *dev) >> +{ >> +struct acpi_device *adev = ACPI_COMPANION(dev); >> + >> +if (!adev) >> +return -EINVAL; > -ENODEV seems to be commonly used in

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-02-26 Thread Sinan Kaya
>> +#ifdef CONFIG_ACPI >> +int vfio_platform_probe_acpi(struct vfio_platform_device *vdev, >> + struct device *dev) >> +{ >> +struct acpi_device *adev = ACPI_COMPANION(dev); >> + >> +if (!adev) >> +return -EINVAL; > -ENODEV seems to be commonly used in

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-02-26 Thread Eric Auger
Hi Sinan, On 02/05/2016 05:34 AM, Sinan Kaya wrote: > The code is using the compatible DT string to associate a reset driver with > the actual device itself. The compatible string does not exist on ACPI > based systems. HID is the unique identifier for a device driver instead. > The change allows

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-02-26 Thread Eric Auger
Hi Sinan, On 02/05/2016 05:34 AM, Sinan Kaya wrote: > The code is using the compatible DT string to associate a reset driver with > the actual device itself. The compatible string does not exist on ACPI > based systems. HID is the unique identifier for a device driver instead. > The change allows

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-02-26 Thread Sinan Kaya
eset ## _module_init); \ > +#define module_vfio_reset_handler(compat, acpihid, reset)\ > +MODULE_ALIAS("vfio-reset:" compat); \ > +static int __init reset ## _module_init(void)

Re: [PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-02-26 Thread Sinan Kaya
it(void) \ > -{\ > - vfio_platform_unregister_reset(compat, reset); \ > -}; \ > -module_init(reset ## _module_init); \ > +#define module_vfio_reset_handler(

[PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-02-04 Thread Sinan Kaya
The code is using the compatible DT string to associate a reset driver with the actual device itself. The compatible string does not exist on ACPI based systems. HID is the unique identifier for a device driver instead. The change allows a driver to register with DT compatible string or ACPI HID

[PATCH V14 8/9] vfio, platform: add support for ACPI while detecting the reset driver

2016-02-04 Thread Sinan Kaya
The code is using the compatible DT string to associate a reset driver with the actual device itself. The compatible string does not exist on ACPI based systems. HID is the unique identifier for a device driver instead. The change allows a driver to register with DT compatible string or ACPI HID