Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1375057imu; Wed, 9 Jan 2019 17:24:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN7aIzZlOTqUR1IkWty0cfXFHI/nEKXPuSJStrmy8clQYHgi3d99L36mgLoYEF6mW+M4zg4H X-Received: by 2002:a17:902:6bc9:: with SMTP id m9mr8196676plt.173.1547083477402; Wed, 09 Jan 2019 17:24:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547083477; cv=none; d=google.com; s=arc-20160816; b=bnzb6iBSk0mojydfb1SVZySc46KSws7xjHJDL+Y+QzJonbL/HK32NsIp9JvS6SM0lV Ar65bdBhSGkexxZ4D8KCc4XQcXjAAQLAgxhx6iqgG037KZHSvONCsP94H8h07uDoEUSY RTbxde1QCo8/KpTR1pJVOMebm+U6bn0E+5tvLbQsSMireyiOKe3o8kmwiuuT4N9qHI8i EYBjAIkakP8M55M4imt0x8ziI3tQm5eqtzqIeW7ARMVijUn/3HxArYuPVVLYh1Us9ci9 K6UGFfx8cPb+8HDjusfvS/EnmkgGzPK8ztQCgp9A3sa+8kLe1xIEvw0AQHDReorRkwSD W+DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=H31nEqTWFWKITXNWFwowQlSoLki+XDqQc3tdNT09n6g=; b=ouRPfNTTkH18zhy+jFfe/0U0qj1gxfEiNt2F+kVolfDf/9jQhjtwBy00ZbApJKzEUK dn3JbrdAtBFCo2oW8vln5ct2IXJ9BioH54nuR0DqlJevsvgjdDPbh6wdLB7kp2h+7pdo J+4PlKfI05radpBzgJiatywlMoXvu/9evqPqMi9Qavu5T4fi/8YOFJl+8Vlag3ak+1mL 63EGihUmMFsfSVlTwFJH17yhvYU8K4Yd18zXe5ARTKfoxX2hP63hI5PL/F4lHgl6HEuf Y3a995KwHZaws2Y9uLcGYYSyfVVF6zq6njUN/hhKlDvpV4JgoS87D9gnKsrZSTBHx/5y fopg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OUZvey7h; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si7245263plo.422.2019.01.09.17.24.22; Wed, 09 Jan 2019 17:24:37 -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; dkim=pass header.i=@kernel.org header.s=default header.b=OUZvey7h; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726987AbfAJBXP (ORCPT + 99 others); Wed, 9 Jan 2019 20:23:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:39860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726590AbfAJBXP (ORCPT ); Wed, 9 Jan 2019 20:23:15 -0500 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 09449214C6; Thu, 10 Jan 2019 01:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547083394; bh=VX4vU9yrQjpbg71YjbHQSMX4frJcJANIwS364qjSlQU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=OUZvey7hz5fTdHSbw2xKpBvoOdWL/UvMF4xqT4aErdenRKfhV2zPQnoCAHCXywdsd N2zOnnCVylTorrdFuBmJ83PqkXde9mx/POyuaxe89RBhYiDe40AwZHblsoMk0svm2d fqiuWHRuB1OJ6PmYh3aro71q9yaXZFzryFGykRfg= Received: by mail-qt1-f176.google.com with SMTP id e5so10623522qtr.12; Wed, 09 Jan 2019 17:23:13 -0800 (PST) X-Gm-Message-State: AJcUukeDnkTSXI5YHWdcWGR0c/MpfpU0e6axEpB5MwFJ2ElZ5kOIlSqS 9DdNoPp2d0fgZxyw2vc6XOIYkDOvq7sg9NzSwA== X-Received: by 2002:aed:29a6:: with SMTP id o35mr7618986qtd.257.1547083393247; Wed, 09 Jan 2019 17:23:13 -0800 (PST) MIME-Version: 1.0 References: <20181221011752.25627-1-sre@kernel.org> <20181221011752.25627-13-sre@kernel.org> <20190109181156.yamhult6bpwkhx74@earth.universe> <0C9AD246-B511-4E59-888F-47EAB034D4BF@holtmann.org> In-Reply-To: <0C9AD246-B511-4E59-888F-47EAB034D4BF@holtmann.org> From: Rob Herring Date: Wed, 9 Jan 2019 19:23:01 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 12/14] media: wl128x-radio: move from TI_ST to hci_ll driver To: Marcel Holtmann , Sebastian Reichel Cc: Mauro Carvalho Chehab , Tony Lindgren , Greg Kroah-Hartman , Pavel Machek , "open list:BLUETOOTH DRIVERS" , Linux Media Mailing List , linux-omap , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 9, 2019 at 1:24 PM Marcel Holtmann wrote: > > Hi Sebastian, > > >>> +static int ll_register_fm(struct ll_device *lldev) > >>> +{ > >>> + struct device *dev = &lldev->serdev->dev; > >>> + int err; > >>> + > >>> + if (!of_device_is_compatible(dev->of_node, "ti,wl1281-st") && > >>> + !of_device_is_compatible(dev->of_node, "ti,wl1283-st") && > >>> + !of_device_is_compatible(dev->of_node, "ti,wl1285-st")) > >>> + return -ENODEV; > >> > >> do we really want to hardcode this here? Isn't there some HCI > >> vendor command or some better DT description that we can use to > >> decide when to register this platform device. > > > > I don't know if there is some way to identify the availability > > based on some HCI vendor command. The public documentation from > > the WiLink chips is pretty bad. > > can we have some boolean property in the DT file then instead of hardcoding this in the driver. Implying the feature based on the compatible is how this is normally done for DT. Though typically we'd put the flag in driver match data rather than code it like this. However, I'd assume that FM radio depends on an antenna connection (to the headphone) which a board may or may not have even though the chip supports it. For that reason, I'm okay with a boolean here. Rob