From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gyungoh Yoo Subject: Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding Date: Tue, 14 Oct 2014 10:11:12 +0900 Message-ID: <20141014011112.GB2751@jack-ThinkPad-T520> References: <1412657745-7812-1-git-send-email-jack.yoo@skyworksinc.com> <1413179262-27636-1-git-send-email-jack.yoo@skyworksinc.com> <1413179262-27636-8-git-send-email-jack.yoo@skyworksinc.com> <20141013103512.GJ27755@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20141013103512.GJ27755-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mark Brown Cc: sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, cooloney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, jack.yoo-tjhQNA90jdKqndwCJWfcng@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org, jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org, shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org, treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, florian.vaussard-p8DiymsW2f8@public.gmane.org, trivial-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org, andrew-g2DYL2Zd6BY@public.gmane.org, jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org List-Id: devicetree@vger.kernel.org On Mon, Oct 13, 2014 at 12:35:12PM +0200, Mark Brown wrote: > On Mon, Oct 13, 2014 at 02:47:41PM +0900, Gyungoh Yoo wrote: > > > - np = of_get_child_by_name(dev->parent->of_node, "regulator"); > > - if (unlikely(!np)) { > > + if (!np) { > > dev_err(dev, "regulator node not found"); > > - return NULL; > > + return ERR_PTR(-ENODATA); > > } > > If you're doing anything here you should convert the code to use the > simplified interface for parsing regulator data based on putting the > subnode name and regualtor name in the regulator descriptor. Thank you for the review. The driver has of_device_id. static const struct of_device_id sky81452_reg_of_match[] = { { .compatible = "skyworks,sky81452-regulator", }, { } }; And the MFD adds the driver with of_compatible="skyworks,sky81452-regulator". MFD core maps the device node and the regulator driver does not need to parse the subnode name. 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