mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Ferry Toth <ftoth@exalondelft.nl>
Cc: linux-kernel@vger.kernel.org,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>
Subject: Re: [PATCH v1 1/1] extcon-intel-mrfld: initialize mrfld_extcon status
Date: Mon, 17 May 2021 16:53:21 +0300	[thread overview]
Message-ID: <YKJ1UUDpRSCDq/bV@smile.fi.intel.com> (raw)
In-Reply-To: <20210424174138.175889-1-ftoth@exalondelft.nl>

On Sat, Apr 24, 2021 at 07:41:38PM +0200, Ferry Toth wrote:
> extcon driver for Basin Cove PMIC shadows the switch status used for dwc3
> DRD to detect a change in the switch position. This change initializes the
> status at probe time.

Chanwoo, can we get this fix in?

> Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
> Fixes: 492929c54791 ("extcon: mrfld: Introduce extcon driver for Basin Cove PMIC")
> ---
>  drivers/extcon/extcon-intel-mrfld.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/extcon/extcon-intel-mrfld.c b/drivers/extcon/extcon-intel-mrfld.c
> index f47016fb28a8..cd1a5f230077 100644
> --- a/drivers/extcon/extcon-intel-mrfld.c
> +++ b/drivers/extcon/extcon-intel-mrfld.c
> @@ -197,6 +197,7 @@ static int mrfld_extcon_probe(struct platform_device *pdev)
>  	struct intel_soc_pmic *pmic = dev_get_drvdata(dev->parent);
>  	struct regmap *regmap = pmic->regmap;
>  	struct mrfld_extcon_data *data;
> +	unsigned int status;
>  	unsigned int id;
>  	int irq, ret;
>  
> @@ -244,6 +245,14 @@ static int mrfld_extcon_probe(struct platform_device *pdev)
>  	/* Get initial state */
>  	mrfld_extcon_role_detect(data);
>  
> +	/*
> +	 * Cached status value is used for cable detection, see comments
> +	 * in mrfld_extcon_cable_detect(), we need to sync cached value
> +	 * with a real state of the hardware.
> +	 */
> +	regmap_read(regmap, BCOVE_SCHGRIRQ1, &status);
> +	data->status = status;
> +
>  	mrfld_extcon_clear(data, BCOVE_MIRQLVL1, BCOVE_LVL1_CHGR);
>  	mrfld_extcon_clear(data, BCOVE_MCHGRIRQ1, BCOVE_CHGRIRQ_ALL);
>  
> -- 
> 2.27.0
> 

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2021-05-17 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210424174208epcas1p2aa4ad71d4450b9995a79e2d378c78865@epcas1p2.samsung.com>
2021-04-24 17:41 ` Ferry Toth
2021-04-25 10:40   ` Andy Shevchenko
2021-05-17 13:53   ` Andy Shevchenko [this message]
2021-05-18  2:52   ` Chanwoo Choi

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=YKJ1UUDpRSCDq/bV@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=cw00.choi@samsung.com \
    --cc=ftoth@exalondelft.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /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®