linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: devicetree@vger.kernel.org, "Conor Dooley" <conor+dt@kernel.org>,
	"Daniel Lezcano" <daniel.lezcano@linaro.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Sebastian Reichel" <sre@kernel.org>,
	linux-kernel@vger.kernel.org, "Søren Andersen" <san@skov.dk>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	kernel@pengutronix.de, linux-pm@vger.kernel.org,
	"Zhang Rui" <rui.zhang@intel.com>,
	"Lukasz Luba" <lukasz.luba@arm.com>
Subject: Re: [PATCH v2 4/8] dt-bindings: power: reset: add bindings for NVMEM hardware storing PSCR Data
Date: Fri, 26 Jan 2024 17:51:53 +0100	[thread overview]
Message-ID: <20240126165153.GA468528@pengutronix.de> (raw)
In-Reply-To: <58d24ddc-4e8f-4932-ac37-c9a699d36425@linaro.org>

On Fri, Jan 26, 2024 at 10:03:51AM +0100, Krzysztof Kozlowski wrote:
> On 25/01/2024 18:11, Oleksij Rempel wrote:
> > On Thu, Jan 25, 2024 at 11:57:18AM +0100, Krzysztof Kozlowski wrote:
> >> On 24/01/2024 13:22, Oleksij Rempel wrote:
> >>> Add device tree bindings that describe hardware implementations of
> >>> Non-Volatile Memory (NVMEM) used for storing Power State Change Reasons
> >>> (PSCR).
> >>> +  that stores Power State Change Reasons (PSCR).
> >>> +
> >>> +allOf:
> >>> +  - $ref: pscrr.yaml#
> >>> +
> >>> +properties:
> >>> +  compatible:
> >>> +    const: pscrr-nvmem
> >>> +
> >>
> >> So that's a driver :/. Maybe Rob will like it, but it's a no from me.
> >> Please come up with something really suiting DEVICES, not DRIVERS.
> > 
> > If I understand your distinction between 'DEVICES' and 'DRIVERS'
> > correctly, 'DEVICES' in the device tree context are meant to represent
> > physical hardware components, while 'DRIVERS' refer to software
> 
> Yes.
> 
> > abstractions of these components. However, there are numerous device
> > tree instances, like software-based implementations for SPI, I2C, or
> > GPIO, which could also be interpreted as 'DRIVERS' in the context of
> 
> True. Yet they are still for physical interfaces. There is no DTS having
> some virtual I2C for a board which does not have I2C.
> 
> > your email. Similarly, the binding for PSCRR represents functionality not
> > fully implemented in hardware but supported by the hardware component of
> > NVMEM, akin to how ramoops or other functionalities are represented.
> 
> You don't need a binding for your case. Instantiate it whatever you wish
> - modprobe for example - and configure through approved kernel
> interfaces - sysfs for example.

About using sysfs for the NVMEM cell, it won't work for my needs because
I have to know about reboot events before the filesystem is ready. So,
I'm thinking of using a boot parameter for the kernel. It would look
like this: pscrr-nvmem.nvmem_cell_alias=nvmem-cell0. This way, I can set
up the NVMEM cell right at the system's start. I'll need to use stable
NVMEM cell names for this. Is it ok to introduce NVMEM cell aliases in
the devicetree?

Best Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2024-01-26 16:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 12:21 [RFC PATCH v1 0/8] Introduction of PSCR Framework and Related Components Oleksij Rempel
2024-01-24 12:21 ` [PATCH v2 1/8] power: Extend power_on_reason.h for upcoming PSCRR framework Oleksij Rempel
2024-01-24 12:21 ` [PATCH v2 2/8] dt-bindings: power: reset: add generic PSCRR binding trackers Oleksij Rempel
2024-01-25 10:54   ` Krzysztof Kozlowski
2024-01-24 12:21 ` [PATCH v2 3/8] power: reset: Introduce PSCR Recording Framework for Non-Volatile Storage Oleksij Rempel
2024-01-28  9:05   ` kernel test robot
2024-01-24 12:22 ` [PATCH v2 4/8] dt-bindings: power: reset: add bindings for NVMEM hardware storing PSCR Data Oleksij Rempel
2024-01-25 10:57   ` Krzysztof Kozlowski
2024-01-25 17:11     ` Oleksij Rempel
2024-01-26  9:03       ` Krzysztof Kozlowski
2024-01-26 16:51         ` Oleksij Rempel [this message]
2024-01-29  7:43           ` Krzysztof Kozlowski
2024-01-24 12:22 ` [PATCH v2 5/8] nvmem: provide consumer access to cell size metrics Oleksij Rempel
2024-01-24 12:22 ` [PATCH v2 6/8] power: reset: add PSCR NVMEM Driver for Recording Power State Change Reasons Oleksij Rempel
2024-01-28  6:38   ` kernel test robot
2024-01-24 12:22 ` [PATCH v2 7/8] regulator: set Power State Change Reason before hw_protection_shutdown() Oleksij Rempel
2024-01-24 12:22 ` [PATCH v2 8/8] thermal: core: Record PSCR " Oleksij Rempel

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=20240126165153.GA468528@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=san@skov.dk \
    --cc=sre@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).