[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200108173540.GA32742@smile.fi.intel.com>
Date: Wed, 8 Jan 2020 19:35:40 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Darren Hart <dvhart@...radead.org>,
Lee Jones <lee.jones@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Zha Qipeng <qipeng.zha@...el.com>,
Rajneesh Bhardwaj <rajneesh.bhardwaj@...ux.intel.com>,
"David E . Box" <david.e.box@...ux.intel.com>,
Guenter Roeck <linux@...ck-us.net>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 28/36] mfd: intel_soc_pmic_mrfld: Convert to use new
SCU IPC API
On Wed, Jan 08, 2020 at 02:41:53PM +0300, Mika Westerberg wrote:
> This converts the Intel Merrifield PMIC driver over the new SCU IPC API
> where the SCU IPC instance is passed to the functions.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>
> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> ---
> drivers/mfd/intel_soc_pmic_mrfld.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/intel_soc_pmic_mrfld.c b/drivers/mfd/intel_soc_pmic_mrfld.c
> index 26a1551c5faf..bd94c989d232 100644
> --- a/drivers/mfd/intel_soc_pmic_mrfld.c
> +++ b/drivers/mfd/intel_soc_pmic_mrfld.c
> @@ -74,10 +74,11 @@ static const struct mfd_cell bcove_dev[] = {
> static int bcove_ipc_byte_reg_read(void *context, unsigned int reg,
> unsigned int *val)
> {
> + struct intel_soc_pmic *pmic = context;
> u8 ipc_out;
> int ret;
>
> - ret = intel_scu_ipc_ioread8(reg, &ipc_out);
> + ret = intel_scu_ipc_dev_ioread8(pmic->scu, reg, &ipc_out);
> if (ret)
> return ret;
>
> @@ -88,10 +89,11 @@ static int bcove_ipc_byte_reg_read(void *context, unsigned int reg,
> static int bcove_ipc_byte_reg_write(void *context, unsigned int reg,
> unsigned int val)
> {
> + struct intel_soc_pmic *pmic = context;
> u8 ipc_in = val;
> int ret;
>
> - ret = intel_scu_ipc_iowrite8(reg, ipc_in);
> + ret = intel_scu_ipc_dev_iowrite8(pmic->scu, reg, ipc_in);
> if (ret)
> return ret;
>
> @@ -117,6 +119,10 @@ static int bcove_probe(struct platform_device *pdev)
> if (!pmic)
> return -ENOMEM;
>
> + pmic->scu = devm_intel_scu_ipc_dev_get(dev);
> + if (!pmic->scu)
> + return -ENOMEM;
> +
> platform_set_drvdata(pdev, pmic);
> pmic->dev = &pdev->dev;
>
> --
> 2.24.1
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists