mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mukesh Savaliya <mukesh.savaliya@oss.qualcomm.com>
To: Praveen Talari <praveen.talari@oss.qualcomm.com>,
	konrad.dybcio@oss.qualcomm.com, Mark Brown <broonie@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	chandana.chiluveru@oss.qualcomm.com
Subject: Re: [PATCH 2/2] spi: qcom-geni: Add panic notifier to suspend controller during panic
Date: Wed, 12 Aug 2026 11:16:37 +0530	[thread overview]
Message-ID: <3aaecc8e-6f08-4e69-a24f-f97926fe7079@oss.qualcomm.com> (raw)
In-Reply-To: <20260805-add-shutdown-and-panic-notifier-for-spi-v1-2-b5db170d491e@oss.qualcomm.com>



On 8/5/2026 4:12 PM, Praveen Talari wrote:

[...]
> @@ -1073,6 +1075,23 @@ static void spi_geni_shutdown(struct platform_device *pdev)
>   	spi_controller_suspend(spi);
>   }
>   
> +static int spi_geni_panic_notifier(struct notifier_block *nb,
> +				   unsigned long action, void *data)
> +{
> +	struct spi_geni_master *mas = container_of(nb, struct spi_geni_master, panic_nb);
> +	struct spi_controller *spi = dev_get_drvdata(mas->dev);
> +
> +	spi_controller_suspend(spi);

Add a line space before return

> +	return NOTIFY_OK;
> +}
> +
> +static void spi_geni_unregister_notifiers(void *data)
> +{
> +	struct spi_geni_master *mas = data;
> +
> +	atomic_notifier_chain_unregister(&panic_notifier_list, &mas->panic_nb);
> +}
> +
>   static int spi_geni_probe(struct platform_device *pdev)
>   {
>   	int ret, irq;
> @@ -1161,7 +1180,16 @@ static int spi_geni_probe(struct platform_device *pdev)
>   	if (ret)
>   		return ret;
>   
> -	return devm_spi_register_controller(dev, spi);
> +	ret = devm_spi_register_controller(dev, spi);
> +	if (ret)
Can you add a trace log here and below where ever you get error ?
Hope that will help in case of issue.
> +		return ret;
> +
> +	mas->panic_nb.notifier_call = spi_geni_panic_notifier;
> +	ret = atomic_notifier_chain_register(&panic_notifier_list, &mas->panic_nb);
> +	if (ret)
same here, add trace log
> +		return ret;
> +
> +	return devm_add_action_or_reset(dev, spi_geni_unregister_notifiers, mas);
>   }
>   
>   static int __maybe_unused spi_geni_runtime_suspend(struct device *dev)
> 


      parent reply	other threads:[~2026-08-12  5:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 10:42 [PATCH 0/2] spi: qcom-geni: Add shutdown and panic notifier support Praveen Talari
2026-08-05 10:42 ` [PATCH 1/2] spi: qcom-geni: Add shutdown callback to quiesce hardware on reboot Praveen Talari
2026-08-12  5:42   ` Mukesh Savaliya
2026-08-05 10:42 ` [PATCH 2/2] spi: qcom-geni: Add panic notifier to suspend controller during panic Praveen Talari
2026-08-11 14:36   ` Mark Brown
2026-08-18  5:34     ` Praveen Talari
2026-08-12  5:46   ` Mukesh Savaliya [this message]

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=3aaecc8e-6f08-4e69-a24f-f97926fe7079@oss.qualcomm.com \
    --to=mukesh.savaliya@oss.qualcomm.com \
    --cc=broonie@kernel.org \
    --cc=chandana.chiluveru@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=praveen.talari@oss.qualcomm.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®