lkml.org 
[lkml]   [2022]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] usb: typec: intel_pmc_mux: Add new ACPI ID for Meteor Lake IOM device
Date
Hi Heikki,

Thank you for the review and feedback.

> > drivers/usb/typec/mux/intel_pmc_mux.c | 9 +++++++--
> > 1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c
> > b/drivers/usb/typec/mux/intel_pmc_mux.c
> > index 47b733f78fb0..a8e273fe204a 100644
> > --- a/drivers/usb/typec/mux/intel_pmc_mux.c
> > +++ b/drivers/usb/typec/mux/intel_pmc_mux.c
> > @@ -571,9 +571,11 @@ static int pmc_usb_register_port(struct pmc_usb
> > *pmc, int index,
> >
> > static int is_memory(struct acpi_resource *res, void *data) {
> > - struct resource r;
> > + struct resource_win win = {};
> > + struct resource *r = &win.res;
> >
> > - return !acpi_dev_resource_memory(res, &r);
> > + return !(acpi_dev_resource_memory(res, r) ||
> > + acpi_dev_resource_address_space(res, &win));
> > }
>
> I realised that now that is_memory() function is basically just a copy of the
> is_memory() function that's in drivers/acpi/resources.c, so I think we need to
> handle this a bit differently. There are a few places in kernel that have that
> same check.
>
> One way would be to just export the is_memory() function that's in
> drivers/acpi/resources.c, but since we have already a wrapper function
> acpi_dev_get_dma_resources() for DMA resouces, I think we could have a
> similar wrapper for common memory resources.
>
> I'll prepare a patch(s) where I'll propose a new wrapper function
> acpi_dev_get_memory_resources() that will take care of the is_memory()
> check, and then convert the users (including this driver). After that, this patch
> only needs to add the ID.

I will wait for your changes then.

Sincerely,
Utkarsh Patel.

\
 
 \ /
  Last update: 2022-08-04 01:52    [W:0.097 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site