mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Brunner <Michael.Brunner@kontron.com>
To: "linux@roeck-us.net" <linux@roeck-us.net>,
	"lee.jones@linaro.org" <lee.jones@linaro.org>
Cc: "sameo@linux.intel.com" <sameo@linux.intel.com>,
	"mibru@gmx.de" <mibru@gmx.de>,
	"vkrasnov@dev.rtsoft.ru" <vkrasnov@dev.rtsoft.ru>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mvanyulin@dev.rtsoft.ru" <mvanyulin@dev.rtsoft.ru>
Subject: Re: [PATCH] mfd: kempld-core: Check for DMI definition before ACPI
Date: Tue, 10 Nov 2020 15:41:47 +0000	[thread overview]
Message-ID: <b9a01e2c8b54fbadfaff8d3a5888802ce4859ed4.camel@kontron.com> (raw)
In-Reply-To: <28a160ac-df8c-0fcb-8814-03125d753be3@roeck-us.net>

Hi Guenter,

thank you for the feedback! checkpatch didn't catch this.
I sent v2 of the patch.

Best regards,
  Michael

On Tue, 2020-11-10 at 06:39 -0800, Guenter Roeck wrote:
> On 11/9/20 11:46 PM, Michael Brunner wrote:
> > Change the detection order to priorize DMI table entries over
> > available
> > ACPI entries.
> > 
> > This makes it more easy for product developers to patch product
> > specific
> > handling into the driver.
> > Furthermore it allows to simplify the implementation a bit and
> > especially to remove the need to force synchronous probing.
> > 
> > Based on the following commit introduced with v5.10-rc1:
> > commit e8299c7313af ("mfd: Add ACPI support to Kontron PLD driver")
> > 
> > Signed-off-by: Michael Brunner <michael.brunner@kontron.com>
> > ---
> >  drivers/mfd/kempld-core.c | 23 ++---------------------
> >  1 file changed, 2 insertions(+), 21 deletions(-)
> > 
> > diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
> > index 2c9295953c11..aa7f386646a1 100644
> > --- a/drivers/mfd/kempld-core.c
> > +++ b/drivers/mfd/kempld-core.c
> > @@ -125,7 +125,6 @@ static const struct kempld_platform_data
> > kempld_platform_data_generic = {
> >  };
> >  
> >  static struct platform_device *kempld_pdev;
> > -static bool kempld_acpi_mode;
> >  
> >  static int kempld_create_platform_device(const struct
> > dmi_system_id *id)
> >  {
> > @@ -501,8 +500,6 @@ static int kempld_probe(struct platform_device
> > *pdev)
> >  		ret = kempld_get_acpi_data(pdev);
> >  		if (ret)
> >  			return ret;
> > -
> > -		kempld_acpi_mode = true;
> >  	} else if (kempld_pdev != pdev) {
> >  		/*
> >  		 * The platform device we are probing is not the one we
> > @@ -565,7 +562,6 @@ static struct platform_driver kempld_driver = {
> >  	.driver		= {
> >  		.name	= "kempld",
> >  		.acpi_match_table = ACPI_PTR(kempld_acpi_table),
> > -		.probe_type = PROBE_FORCE_SYNCHRONOUS,
> >  	},
> >  	.probe		= kempld_probe,
> >  	.remove		= kempld_remove,
> > @@ -884,7 +880,6 @@ MODULE_DEVICE_TABLE(dmi, kempld_dmi_table);
> >  static int __init kempld_init(void)
> >  {
> >  	const struct dmi_system_id *id;
> > -	int ret;
> >  
> >  	if (force_device_id[0]) {
> >  		for (id = kempld_dmi_table;
> > @@ -894,24 +889,10 @@ static int __init kempld_init(void)
> >  					break;
> >  		if (id->matches[0].slot == DMI_NONE)
> >  			return -ENODEV;
> > -	}
> > -
> > -	ret = platform_driver_register(&kempld_driver);
> > -	if (ret)
> > -		return ret;
> > -
> > -	/*
> > -	 * With synchronous probing the device should already be probed
> > now.
> > -	 * If no device id is forced and also no ACPI definition for
> > the
> > -	 * device was found, scan DMI table as fallback.
> > -	 *
> > -	 * If drivers_autoprobing is disabled and the device is found
> > here,
> > -	 * only that device can be bound manually later.
> > -	 */
> > -	if (!kempld_pdev && !kempld_acpi_mode)
> > +	} else
> 
> 	} else {
> >  		dmi_check_system(kempld_dmi_table);
> 	}
> 
> Guenter
> 
> >  
> > -	return 0;
> > +	return platform_driver_register(&kempld_driver);
> >  }
> >  
> >  static void __exit kempld_exit(void)
> > 

  reply	other threads:[~2020-11-10 15:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10  7:46 Michael Brunner
2020-11-10 14:39 ` Guenter Roeck
2020-11-10 15:41   ` Michael Brunner [this message]
2020-11-10 16:10     ` Guenter Roeck
2020-11-10 15:23 ` [PATCH v2] " Michael Brunner
2020-11-10 16:11   ` Guenter Roeck
2020-11-13 10:14     ` Lee Jones
2020-11-13 10:16   ` Lee Jones
2020-11-16  6:46     ` Michael Brunner
2020-11-16  6:42   ` [PATCH v3] " Michael Brunner
2020-11-27  7:53     ` Lee Jones
2020-11-30 13:08       ` Michael Brunner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9a01e2c8b54fbadfaff8d3a5888802ce4859ed4.camel@kontron.com \
    --to=michael.brunner@kontron.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mibru@gmx.de \
    --cc=mvanyulin@dev.rtsoft.ru \
    --cc=sameo@linux.intel.com \
    --cc=vkrasnov@dev.rtsoft.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®