Thread (29 messages) 29 messages, 3 authors, 2014-11-04

Re: [PATCH v6 04/12] misc: at25: Make use of device property API

From: Mika Westerberg <hidden>
Date: 2014-11-04 14:38:42
Also in: linux-acpi, lkml

On Tue, Nov 04, 2014 at 02:18:26PM +0000, Grant Likely wrote:
quoted
-	strncpy(chip->name, np->name, sizeof(chip->name));
+	strncpy(chip->name, "at25", sizeof(chip->name));
This line changes behaviour of the driver. It's possibly not a problem,
but it should be commented on and whether any due diligance has been
done to make sure it there isn't anything that depends on it.
I found only one user for "atmel,at25" in any of the DT sample files.

arch/arm/boot/dts/phy3250.dts:

	eeprom: at25@0 {
		...
		at25,byte-len = <0x8000>;
		at25,addr-mode = <2>;
		at25,page-size = <64>;

		compatible = "atmel,at25";
		reg = <0>;
		spi-max-frequency = <5000000>;
	};

I think np->name is "at25" in this case? The binding file
Documentation/devicetree/bindings/misc/at25.txt also has the same name.

Are you OK, if we add something like below to the changelog?

 In addition we hard-code the name of the chip to be "at25" for the
 reason that there is no common mechanism to fetch name of the firmware
 node. The only existing user (arch/arm/boot/dts/phy3250.dts) uses the
 same name so it should continue to work.
Otherwise:
Acked-by: Grant Likely <redacted>
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help