From: "André Draszik" <andre.draszik@linaro.org>
To: Peter Griffin <peter.griffin@linaro.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org, tudor.ambarus@linaro.org,
willmcvicker@google.com, semen.protsenko@linaro.org,
kernel-team@android.com, jaewon02.kim@samsung.com
Subject: Re: [PATCH v2 2/4] pinctrl: samsung: add dedicated SoC eint suspend/resume callbacks
Date: Thu, 06 Mar 2025 15:12:11 +0000 [thread overview]
Message-ID: <4f91fe1c5eed00e58a3587bceaef3e5e2a1124cf.camel@linaro.org> (raw)
In-Reply-To: <f7c0101ff26ac0d4ef70a374ae31ee5d23b3c8fc.camel@linaro.org>
On Thu, 2025-03-06 at 11:57 +0000, André Draszik wrote:
> On Sat, 2025-03-01 at 11:43 +0000, Peter Griffin wrote:
> > [...]
> >
> > -static void exynos_pinctrl_resume_bank(
> > - struct samsung_pinctrl_drv_data *drvdata,
> > - struct samsung_pin_bank *bank)
> > +void exynos_pinctrl_resume(struct samsung_pin_bank *bank)
> > {
> > struct exynos_eint_gpio_save *save = bank->soc_priv;
> > void __iomem *regs = bank->eint_base;
> >
> > - if (clk_enable(bank->drvdata->pclk)) {
> > - dev_err(bank->gpio_chip.parent,
> > - "unable to enable clock for restoring state\n");
> > - return;
> > + if (bank->eint_type == EINT_TYPE_GPIO) {
> > + pr_debug("%s: con %#010x => %#010x\n", bank->name,
> > + readl(regs + EXYNOS_GPIO_ECON_OFFSET
> > + + bank->eint_offset), save->eint_con);
> > + pr_debug("%s: fltcon0 %#010x => %#010x\n", bank->name,
> > + readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET
> > + + 2 * bank->eint_offset), save->eint_fltcon0);
> > + pr_debug("%s: fltcon1 %#010x => %#010x\n", bank->name,
> > + readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET
> > + + 2 * bank->eint_offset + 4),
> > + save->eint_fltcon1);
The indent on this last line is a bit off.
> > + pr_debug("%s: mask %#010x => %#010x\n", bank->name,
> > + readl(regs + bank->irq_chip->eint_mask
> > + + bank->eint_offset), save->eint_mask);
> > +
> > + writel(save->eint_con, regs + EXYNOS_GPIO_ECON_OFFSET
> > + + bank->eint_offset);
> > + writel(save->eint_fltcon0, regs + EXYNOS_GPIO_EFLTCON_OFFSET
> > + + 2 * bank->eint_offset);
> > + writel(save->eint_fltcon1, regs + EXYNOS_GPIO_EFLTCON_OFFSET
> > + + 2 * bank->eint_offset + 4);
> > + writel(save->eint_mask, regs + bank->irq_chip->eint_mask
> > + + bank->eint_offset);
> > }
> > -
> > - pr_debug("%s: con %#010x => %#010x\n", bank->name,
> > - readl(regs + EXYNOS_GPIO_ECON_OFFSET
> > - + bank->eint_offset), save->eint_con);
> > - pr_debug("%s: fltcon0 %#010x => %#010x\n", bank->name,
> > - readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET
> > - + 2 * bank->eint_offset), save->eint_fltcon0);
> > - pr_debug("%s: fltcon1 %#010x => %#010x\n", bank->name,
> > - readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET
> > - + 2 * bank->eint_offset + 4), save->eint_fltcon1);
> > - pr_debug("%s: mask %#010x => %#010x\n", bank->name,
> > - readl(regs + bank->irq_chip->eint_mask
> > - + bank->eint_offset), save->eint_mask);
> > -
> > - writel(save->eint_con, regs + EXYNOS_GPIO_ECON_OFFSET
> > - + bank->eint_offset);
> > - writel(save->eint_fltcon0, regs + EXYNOS_GPIO_EFLTCON_OFFSET
> > - + 2 * bank->eint_offset);
> > - writel(save->eint_fltcon1, regs + EXYNOS_GPIO_EFLTCON_OFFSET
> > - + 2 * bank->eint_offset + 4);
> > - writel(save->eint_mask, regs + bank->irq_chip->eint_mask
> > - + bank->eint_offset);
> > -
> > - clk_disable(bank->drvdata->pclk);
> > }
> >
> > -static void exynosauto_pinctrl_resume_bank(struct samsung_pinctrl_drv_data *drvdata,
> > - struct samsung_pin_bank *bank)
> > +void exynosautov920_pinctrl_resume(struct samsung_pin_bank *bank)
> > {
> > struct exynos_eint_gpio_save *save = bank->soc_priv;
> > void __iomem *regs = bank->eint_base;
> >
> > - if (clk_enable(bank->drvdata->pclk)) {
> > - dev_err(bank->gpio_chip.parent,
> > - "unable to enable clock for restoring state\n");
> > - return;
> > + if (bank->eint_type == EINT_TYPE_GPIO) {
> > + /* exynosautov920 has eint_con_offset for all but one bank */
> > + if (!bank->eint_con_offset)
> > + exynos_pinctrl_resume(bank);
> > +
> > + pr_debug("%s: con %#010x => %#010x\n", bank->name,
> > + readl(regs + bank->pctl_offset + bank->eint_con_offset),
> > + save->eint_con);
and here
Cheers,
Andre'
next prev parent reply other threads:[~2025-03-06 15:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-01 11:43 [PATCH v2 0/4] samsung: pinctrl: Add support for eint_fltcon_offset and filter selection on gs101 Peter Griffin
2025-03-01 11:43 ` [PATCH v2 1/4] pinctrl: samsung: add support for eint_fltcon_offset Peter Griffin
2025-03-06 11:24 ` André Draszik
2025-03-01 11:43 ` [PATCH v2 2/4] pinctrl: samsung: add dedicated SoC eint suspend/resume callbacks Peter Griffin
2025-03-06 11:57 ` André Draszik
2025-03-06 15:12 ` André Draszik [this message]
2025-03-06 20:47 ` Peter Griffin
2025-03-01 11:43 ` [PATCH v2 3/4] pinctrl: samsung: add gs101 specific " Peter Griffin
2025-03-06 15:12 ` André Draszik
2025-03-01 11:43 ` [PATCH v2 4/4] pinctrl: samsung: Add filter selection support for alive bank on gs101 Peter Griffin
2025-03-06 15:26 ` André Draszik
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=4f91fe1c5eed00e58a3587bceaef3e5e2a1124cf.camel@linaro.org \
--to=andre.draszik@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=jaewon02.kim@samsung.com \
--cc=kernel-team@android.com \
--cc=krzk@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=s.nawrocki@samsung.com \
--cc=semen.protsenko@linaro.org \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.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®