Re: [RFC PATCH 1/4] dts: misc: Add bindings documentation for bmc-misc-ctrl

2018-07-03 Thread Andrew Jeffery
Hi Greg,

On Tue, 3 Jul 2018, at 17:20, Greg KH wrote:
> On Tue, Jul 03, 2018 at 05:04:10PM +1000, Andrew Jeffery wrote:
> > Signed-off-by: Andrew Jeffery 
> > ---
> 
> I can't take patches without any changelog text at all :(
> 

I wasn't expecting you to put them into your tree - the general 
concept/implementation is still too immature for that, let alone the commit 
messages :) However, I'll address this before sending another spin of the 
patches.

Sorry for the noise and thanks for the quick response.

Andrew


Re: [RFC PATCH 1/4] dts: misc: Add bindings documentation for bmc-misc-ctrl

2018-07-03 Thread Benjamin Herrenschmidt
On Tue, 2018-07-03 at 16:31 +0200, Greg KH wrote:
> On Wed, Jul 04, 2018 at 12:16:49AM +1000, Benjamin Herrenschmidt wrote:
> > On Tue, 2018-07-03 at 09:50 +0200, Greg KH wrote:
> > > On Tue, Jul 03, 2018 at 05:04:10PM +1000, Andrew Jeffery wrote:
> > > > Signed-off-by: Andrew Jeffery 
> > > > ---
> > > 
> > > I can't take patches without any changelog text at all :(
> > 
> > Greg (and replying to your other comments as well)...
> > 
> > This is an RFC series, it's not meant for you to take at this point,
> > it's about discussing the overall approach to exposing BMC random
> > "tunables" as explained in patch 0 of the series.
> > 
> > Yes the individual patches aren't yet at the level of polish for a
> > formal submission, we (naively ?) thought that's what the whole RFC tag
> > is about :-)
> 
> Oh come on, putting a basic "here is what this patch does" comment
> should be part of every patch, otherwise what is there to comment on if
> we don't know what is going on in the patch itself?

Well, it adds documentation :-) You can just read the patch which is
... the documentation :)
> 
> Anyway, I provided a bunch of feedback to the "real" patch in this
> series...

Yes, you did that's fine. Thanks.

Cheers,
Ben.



Re: [RFC PATCH 1/4] dts: misc: Add bindings documentation for bmc-misc-ctrl

2018-07-03 Thread Greg KH
On Wed, Jul 04, 2018 at 12:16:49AM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2018-07-03 at 09:50 +0200, Greg KH wrote:
> > On Tue, Jul 03, 2018 at 05:04:10PM +1000, Andrew Jeffery wrote:
> > > Signed-off-by: Andrew Jeffery 
> > > ---
> > 
> > I can't take patches without any changelog text at all :(
> 
> Greg (and replying to your other comments as well)...
> 
> This is an RFC series, it's not meant for you to take at this point,
> it's about discussing the overall approach to exposing BMC random
> "tunables" as explained in patch 0 of the series.
> 
> Yes the individual patches aren't yet at the level of polish for a
> formal submission, we (naively ?) thought that's what the whole RFC tag
> is about :-)

Oh come on, putting a basic "here is what this patch does" comment
should be part of every patch, otherwise what is there to comment on if
we don't know what is going on in the patch itself?

Anyway, I provided a bunch of feedback to the "real" patch in this
series...


greg k-h


Re: [RFC PATCH 1/4] dts: misc: Add bindings documentation for bmc-misc-ctrl

2018-07-03 Thread Benjamin Herrenschmidt
On Tue, 2018-07-03 at 09:50 +0200, Greg KH wrote:
> On Tue, Jul 03, 2018 at 05:04:10PM +1000, Andrew Jeffery wrote:
> > Signed-off-by: Andrew Jeffery 
> > ---
> 
> I can't take patches without any changelog text at all :(

Greg (and replying to your other comments as well)...

This is an RFC series, it's not meant for you to take at this point,
it's about discussing the overall approach to exposing BMC random
"tunables" as explained in patch 0 of the series.

Yes the individual patches aren't yet at the level of polish for a
formal submission, we (naively ?) thought that's what the whole RFC tag
is about :-)

Cheers,
Ben.



Re: [RFC PATCH 1/4] dts: misc: Add bindings documentation for bmc-misc-ctrl

2018-07-03 Thread Greg KH
On Tue, Jul 03, 2018 at 05:04:10PM +1000, Andrew Jeffery wrote:
> Signed-off-by: Andrew Jeffery 
> ---

I can't take patches without any changelog text at all :(



[RFC PATCH 1/4] dts: misc: Add bindings documentation for bmc-misc-ctrl

2018-07-03 Thread Andrew Jeffery
Signed-off-by: Andrew Jeffery 
---
 .../bindings/misc/bmc-misc-ctrl.txt   | 252 ++
 MAINTAINERS   |   6 +
 2 files changed, 258 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/bmc-misc-ctrl.txt

diff --git a/Documentation/devicetree/bindings/misc/bmc-misc-ctrl.txt 
b/Documentation/devicetree/bindings/misc/bmc-misc-ctrl.txt
new file mode 100644
index ..4661926030e4
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/bmc-misc-ctrl.txt
@@ -0,0 +1,252 @@
+BMC Miscellaneous Control Interfaces
+
+
+Baseboard Management Controllers (BMCs) often have an array of hardware
+features that need to be described but are awkward to sensibly expose.
+
+This bindings document provides a generic mechanism for describing such
+features, covering read-only (RO), read-modify-write (RMW) and
+write-1-set/write-1-clear (W1SC) semantics.
+
+All uses of bmc-misc-ctrl must be documented under Valid Uses below.
+
+The bindings are similar in nature to register-bit-led.
+
+Required Properties
+---
+
+compatible:Must be "bmc-misc-ctrl"
+offset:A one or three cell property describing the registers
+   associated with the field.
+
+   If the optional property 'set-clear' is not present then the
+   node describes a register with read-modify-write semantics. The
+   offset property has one cell describing the register of
+   interest.
+
+   If the optional property 'set-clear' is present then the node
+   describes a register set that together implement read,
+   write-1-set and write-1-clear semantics. The offset property
+   must be three cells, the first is the address of the register
+   to read from, the second the write-1-set register and the third
+   write-1-clear.
+
+mask:  A mask whose set bits represent the bits of the field.
+label: The name of the field
+
+Optional Properties
+---
+
+read-only: Define a read-only field (RMW/W1SC irrelevant).
+set-clear: Define whether the field exists in a RMW or W1SC register set
+default-value: Single cell applicable to RMW. The field will be updated to the
+   cell's value.
+default-set:   For W1SC, set all bits in the field
+default-clear: For W1SC, clear all bits in the field
+
+Valid Uses
+--
+
+Description:   Control bit for switching the video display DAC mux between
+   host VGA and BMC CRT mode
+Machines:  aspeed,ast2500
+Parent:compatible = "aspeed,ast2500-scu", "syscon", 
"simple-mfd";
+Node:
+   field@2c.16 {
+   compatible = "bmc-misc-ctrl";
+   offset = <0x2c>;
+   mask = <0x0003>;
+   label = "dac-mux";
+   };
+
+Description:   Host VGA scratch registers
+Machines:  aspeed,ast2500
+Parent:compatible = "aspeed,ast2500-scu", "syscon", 
"simple-mfd";
+Node:
+   field@50.0 {
+   compatible = "bmc-misc-ctrl";
+   offset = <0x50>;
+   mask = <0x>;
+   label = "vga0";
+   read-only;
+   };
+
+   field@54.0 {
+   compatible = "bmc-misc-ctrl";
+   offset = <0x54>;
+   mask = <0x>;
+   label = "vga1";
+   read-only;
+   };
+
+   field@58.0 {
+   compatible = "bmc-misc-ctrl";
+   offset = <0x58>;
+   mask = <0x>;
+   label = "vga2";
+   read-only;
+   };
+
+   field@5c.0 {
+   compatible = "bmc-misc-ctrl";
+   offset = <0x5c>;
+   mask = <0x>;
+   label = "vga3";
+   read-only;
+   };
+
+   field@60.0 {
+   compatible = "bmc-misc-ctrl";
+   offset = <0x60>;
+   mask = <0x>;
+   label = "vga4";
+   read-only;
+   };
+
+   field@64.0 {
+   compatible = "bmc-misc-ctrl";
+   offset = <0x64>;
+   mask = <0x>;
+   label = "vga5";
+   read-only;
+   };
+
+   field@68.0 {
+   compatible = "bmc-misc-ctrl";
+   offset = <0x68>;
+   mask = <0x>;
+   label = "vga6";
+   read-only;
+