From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfram Sang Subject: Re: [PATCH v2] i2c: mv64xxx: continue probe when clock-frequency is missing Date: Tue, 2 Sep 2014 12:39:59 +0200 Message-ID: <20140902103959.GC1266@katana> References: <1409581693-15943-1-git-send-email-wens@csie.org> Reply-To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DIOMP1UsTsWJauNi" Return-path: Content-Disposition: inline In-Reply-To: <1409581693-15943-1-git-send-email-wens-jdAy2FN1RRM@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Chen-Yu Tsai Cc: Maxime Ripard , Gregory CLEMENT , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Andrew Lunn , linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org --DIOMP1UsTsWJauNi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 01, 2014 at 10:28:13PM +0800, Chen-Yu Tsai wrote: > The "clock-frequency" DT property is listed as optional, However, > the current code stores the return value of of_property_read_u32 in > the return code of mv64xxx_of_config, but then forgets to clear it > after setting the default value of "clock-frequency". It is then > passed out to the main probe function, resulting in a probe failure > when "clock-frequency" is missing. >=20 > This patch checks and then throws away the return value of > of_property_read_u32, instead of storing it and having to clear it > afterwards. >=20 > This issue was discovered after the property was removed from all > sunxi DTs. Hmm, I don't like that removal. Probably I should take care that this property is not "optional" but "recommended". The default value is depending on the driver, mostly because of historic reasons. It is definately better to explicitly state it. Despite all that... >=20 > Fixes: 4c730a06c19bb ("i2c: mv64xxx: Set bus frequency to 100kHz if clock= -frequency is not provided") > Signed-off-by: Chen-Yu Tsai > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Acked-by: Andrew Lunn > Acked-by: Maxime Ripard Applied to for-current, thanks! --DIOMP1UsTsWJauNi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUBZ5/AAoJEBQN5MwUoCm20C8P/jMBBZ/8ko6qmQ8OsKJfaY2C 5zl+S9dKllOcee6xITNDdwZPEhm7whGnJbxgw822CokOpaxtZtRsQlF6d3FLZqiK Unrzc7kGGKSBkUNGtTOuwix2YfbJ3EtBkVxPwPX3VpWtQDxY6FrvQbRSIJn84Wqz o8byrnuFhxVHYg6f4AjFpv0hM0APjSrLcy4NV8qN18qSap2WEzZmxk/wOcaf0VLb h/KkLErzwU9edBVJ4G09PTrElwwGDZ+QbVUNIY6oVw+5dCWbuIFSrYZMjzW21Zq5 +mzQiQXnrIbXsr+d2GtuianbZ6KDXDvFN4FbL7uG+LHlqlWDZZDNNAPUe3K4bQkh +fKIpXpNX/XRUEmXPVXeOKdhtExE8ZYiPSAVQJ4dpAodbpo5MhOVkYH1e0QQpmmV UtB5YYJlsiFzfDncwv897+sM4mTAnYYYE27/SPGjvM7nzc1POdNe/pXUxW5NphJ8 +8jl5kIjiiN4BeuDvWWWdcZi03BUF/RsUsQ7b0Zfn3rVxyhGxV9Tq6McojkORHDd EGbfFEfB7FiGxoBqmjdJih0D2upDS/EpwOhLP87u35llFhXpjd9FwGpsSSydZKVO +tcLkYgmeJXKAYI5QkugDghgiPNATG3P84zP3hYObg1YuxfGWHnACbqXdCyCBFqK nbeMjtuBNtYX8obzymRb =Aw/R -----END PGP SIGNATURE----- --DIOMP1UsTsWJauNi--