From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752191AbcFULbC (ORCPT ); Tue, 21 Jun 2016 07:31:02 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:55624 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740AbcFULa5 (ORCPT ); Tue, 21 Jun 2016 07:30:57 -0400 Date: Tue, 21 Jun 2016 12:03:32 +0100 From: Mark Brown To: Felipe Balbi Cc: Baolin Wang , gregkh@linuxfoundation.org, sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org, robh@kernel.org, jun.li@nxp.com, m.szyprowski@samsung.com, ruslan.bilovol@gmail.com, peter.chen@freescale.com, stern@rowland.harvard.edu, r.baldyga@samsung.com, grygorii.strashko@ti.com, yoshihiro.shimoda.uh@renesas.com, lee.jones@linaro.org, ckeepax@opensource.wolfsonmicro.com, patches@opensource.wolfsonmicro.com, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, device-mainlining@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Message-ID: <20160621110332.GC26099@sirena.org.uk> References: <7dc384248d51b1de0df54909f3c5550584b31357.1466497506.git.baolin.wang@linaro.org> <878txyomue.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="U58U7wle/RT11wuz" Content-Disposition: inline In-Reply-To: <878txyomue.fsf@linux.intel.com> X-Cookie: news: gotcha User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v12 4/4] power: wm831x_power: Support USB charger current limit management X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --U58U7wle/RT11wuz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 21, 2016 at 01:30:49PM +0300, Felipe Balbi wrote: > Baolin Wang writes: > > @@ -607,8 +647,31 @@ static int wm831x_power_probe(struct platform_device *pdev) > > } > > } > > + if (wm831x_pdata && wm831x_pdata->usb_gadget) { > > + power->usb_charger = > > + usb_charger_find_by_name(wm831x_pdata->usb_gadget); > the fact that you rely on strings and pass them via pdata is an > indication that you don't have enough description of the HW. Seems like > we need to come up with a set of DT properties which tie a charger to a > UDC. > I'm thinking a phandle would be enough? The wm831x has no DT support currently. --U58U7wle/RT11wuz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXaR8CAAoJECTWi3JdVIfQjU8H/jog/hL42HAeCq/gDhwKrem0 +/uk7Vu/Vh6AWNkU9w4V0hX9++iLy5mlgBd24RYl9n5plu4DzpyJf/lwVUBGbDC4 CjOVb+LjQyG6deQU6R/SFHwSwHglNNn4Xe+2DrLeGZzgGkSdujcIj9cqIKQ9y+CW tFzOS83/KEaS4FNYSFiF9YwycsCjL6wo6/oO4Mnwt2HmSb8zi2UrKaV5iKU0XY0g 2NgazRPqnMh2x50zeo2pO9IY1Scjd4hDWVDeG2VKwtmanKFd3w3oa2nG9IWWl67/ 1s+xe6HgzzMWF2eee/54ErOhn8t7NS8aVyT/ESy8OuMKuqXE90qDWL8ZrfFxguU= =BVSD -----END PGP SIGNATURE----- --U58U7wle/RT11wuz--