Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2580229imu; Sat, 10 Nov 2018 18:47:33 -0800 (PST) X-Google-Smtp-Source: AJdET5ez6EcUG/VjwV0Oc3ekkXKYtXB5IragIst1oqWLIoRLj4wC477sJ19+W1LrCKpvfwVSLe++ X-Received: by 2002:a62:1095:: with SMTP id 21-v6mr14843109pfq.227.1541904453507; Sat, 10 Nov 2018 18:47:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541904453; cv=none; d=google.com; s=arc-20160816; b=HjSLKFf0X//2tENwMSugCM4SixRqEgZoZSfGyGQ2SQfFedsS8I1u9bQqN6pfcYILHo Bwv0V2/eEBh6h1Tv+xqi10y2RSu+DLPqjUQmEgm9hsL0f0vIxV+1uAwa+BV1QmSyj95t 0wp0Ki63wvUT7NF7ZmTX209pAjDDAbNSHMo5c3HK2785rnU1NmMX0O1bq2FTb3WpopyJ Eia8da4icg/8JzKYap0IObGw/b3VUxKbjjhpgOTf7ZfxA6Tou3LxLYVd9THnhqNmOiEj 7R6Ji7S1MqhYSyWzjdANye66pPoRYUDnvkJiOKsNPLG0aDONWykp+qlExcxVB3sY2a9F vFQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=s1a3ZIBJeiCwASbxhc0E1tVruxiIUzekqCLfur/osl0=; b=sMte9Jia5ljopV6Fh6Rh4YQsC67q4ur8eWZv0HvG4+Ka909hsaFOK2xRDAKPK5FOOW XeuFbUyqTEAr0gF1zcR1pI/NI3s/eDBEWkM0oIlEwu9SrEe5nLZ8ehwMKg/qwUyYJz7V DHidnQH0u9LgPZQp37rhmdQBQXIdQiHhmw01qogqgWmHYsDkqWYO6DaxuajN0mm8Kn64 PE471sg8ipXdSHmn1BiiXGtsjxOEzwaBjMcM1xAwLnlQ/ydQ08u7MXRBqCwTGrktKjW0 oyBy9VdZJUBpbACjmK++WlaUF8JoXOsEv1sFwOGI9MK3C7shW+ION08cwTjtPPGNOPlq +V5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r27si11752241pgl.494.2018.11.10.18.47.17; Sat, 10 Nov 2018 18:47:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727328AbeKKMeG (ORCPT + 99 others); Sun, 11 Nov 2018 07:34:06 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48728 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726945AbeKKMeG (ORCPT ); Sun, 11 Nov 2018 07:34:06 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id B3B0326406F Received: by earth.universe (Postfix, from userid 1000) id 027EF3C08D6; Sun, 11 Nov 2018 03:46:48 +0100 (CET) Date: Sun, 11 Nov 2018 03:46:48 +0100 From: Sebastian Reichel To: Andreas Kemnade Cc: marcel@holtmann.org, johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, letux-kernel@openphoenux.org Subject: Re: [PATCH RFC] bluetooth: add uart h4 devices via serdev/devicetree Message-ID: <20181111024648.7rt7rlhaqihtqecv@earth.universe> References: <20181110232034.17277-1-andreas@kemnade.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k52q5scznxewnt47" Content-Disposition: inline In-Reply-To: <20181110232034.17277-1-andreas@kemnade.info> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --k52q5scznxewnt47 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sun, Nov 11, 2018 at 12:20:34AM +0100, Andreas Kemnade wrote: > This is a first try to be able to use h4 devices specified in > the devicetree, so you do not need to call hciattach and > it can be automatically probed. >=20 > Of course, proper devicetree bindings documentation is > missing. And also you would extend that by regulator/ > enable gpio settings. >=20 > But before proceeding further it should be checked if the > general way of doing things is right. >=20 > Signed-off-by: Andreas Kemnade > --- Patch looks good to me, just one note > drivers/bluetooth/hci_h4.c | 78 ++++++++++++++++++++++++++++++++++++++++= ++++++ > 1 file changed, 78 insertions(+) >=20 [...] > + return hci_uart_register_device(hu, &h4p); > +} > + > +static void hci_h4_remove(struct serdev_device *serdev) > +{ > + struct h4_device *h4dev =3D serdev_device_get_drvdata(serdev); > + > + hci_uart_unregister_device(&h4dev->hu); > +} I suggest to add a patch introducing devm_hci_uart_register_device() All existing users of hci_uart_register_device() could use it (your driver, hci_bcm, hci_h5, hci_ll, hci_nokia and hci_qca) and all drivers but hci_qca can drop their remove function. -- Sebastian --k52q5scznxewnt47 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlvnmBUACgkQ2O7X88g7 +pqzMQ//VqC1GTpZhAWWF3ZfWkVRrzBBUvcFGws0Mjlvc56FUJVD//VCGWmBm9Q4 H4jgogFIpjAtdxOQj3TnjqMcGO4XaWkj2hV+3X/NxkgBdAZYOR6Pz4nkcZQRL01R l1CR4gCF7K9zGd+yj2XTOM4Rs8HmUvkU37rlaALe7J4tzd2fPf6wafztAKSDTOmL 1vw8c9/hT2jeadfrlK8QED0a2C+d3PE0fcWrpY0SU+lBI2CgT/fb7cEHk1xpJ9BC ALIYxXKWOLoBPe67FrNvghoQre4SPu4BUfoQJZJ4uC9st8B16RgaomoBk1Y2rUHr iTxxyBoFyX0lTB5lMTKPscHTNsawpAq1wf9ENkEjNztLn2d8hk4N68H5SGfTXpH6 rgw2081hRP/dUe3oADItWIRJ6jFRSUuorE/KeLpZHPN+arJwFGK292hkCvPbQzn2 ncTpxSfdSQDlHc5lhPH2v7ylhmrRhnkwmAdyRuwkIEYkKLyxwDH++GlkGxLKyVc7 aOqQ8VVKDlos1u+vbXWew8OaMWfKS5PCLbAdTuSb8ntHSdouIacbv+ZeSarxgTl/ HV0mLjr1haU8JPRJE7KNetQyANoR2mUEB4cw7pxwjaTA45Uf14wuhNYN81I/R7VF NZ29WLtHf8BHf7h/MgU6xF1/mv9jJD8rTojrlXzy4extkVmuvQ4= =WtdZ -----END PGP SIGNATURE----- --k52q5scznxewnt47--