Received: by 10.213.65.68 with SMTP id h4csp3523524imn; Mon, 9 Apr 2018 23:44:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ai5HM87oGEUDn/S+dTpYjwrkyoYilZPTwEWsQ9CAUp7f2ceVgGNgGTzCmAXPxAsqDLD88 X-Received: by 2002:a17:902:f44:: with SMTP id 62-v6mr30317844ply.318.1523342640782; Mon, 09 Apr 2018 23:44:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523342640; cv=none; d=google.com; s=arc-20160816; b=q19MOjiUZTHr82TeZYF5NQEMz9LtFQ6jyLf/jA5CQ6WOZpRCspvbnXaNP0e425kU40 G37Q6dhPdTtCjonYPJB7kBPxD9S+D+LT13VFlYMATwaFq2dGwcr7ANeCc0CQ0r6iAC78 wFrZqD276eF+L2PhFsH8+saRTXUvGn3D8/giX4ogG74c6dkst+SfcmsIc8LYrJfzISll mwFx10I000YDVojI/QbaN3kE0GRdinDTIi0/622RUwrt45AOC818GMBRT0Du1V4HTnOt +ttrxdUtLtFUySGrJjh95JliVN1W6wKOIZ/s+2A5h86pqViapO9q4OvSrQVSrouL2Z02 nidQ== 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:arc-authentication-results; bh=ePtEaUf5T4BsSKg1yVE/G5scK+fe7k26dt2RyZc3aE0=; b=xHZAW10q752/9SlHpH7uu7buk2K9k4hvt23KTx31sKbcmIV7AINdikyWpnaPCi+FFx qooyjc9aLxpJFUZY++keDr0jke48TzCXqzQrQX036hcM5d1NHM34koqELQO5YS0/8Kuo QMX10Neuxw91pwLNBY3/pY2LGVKxigl4XoiDMcnENeNDttbil6I0KQhXRP/el2wqjb+p kDztFx8pL679VZJxa4lalkh1KvbPGNaNXFtAmoG8/UpMFyzNtDo+zPBJHQM/TQlbpD7h ClyrDkI/v5CjDZwpXzPrvu9TGSfCTcxO+fEXzr8s8Lvad/o2hdA2KenCQQf6YQzaZt0z +ZOw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2-v6si1942276plo.670.2018.04.09.23.43.23; Mon, 09 Apr 2018 23:44:00 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752561AbeDJGiY (ORCPT + 99 others); Tue, 10 Apr 2018 02:38:24 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:40112 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752211AbeDJGiX (ORCPT ); Tue, 10 Apr 2018 02:38:23 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 759E380241; Tue, 10 Apr 2018 08:38:21 +0200 (CEST) Date: Tue, 10 Apr 2018 08:38:20 +0200 From: Pavel Machek To: Sebastian Reichel Cc: Milo Kim , Lee Jones , Daniel Thompson , Rob Herring , Tony Lindgren , Jingoo Han , Mark Rutland , linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCHv4 08/10] backlight: add TI LMU backlight driver Message-ID: <20180410063820.GA5793@amd> References: <20180330172414.26575-1-sebastian.reichel@collabora.co.uk> <20180330172414.26575-9-sebastian.reichel@collabora.co.uk> <20180403104908.GD6758@amd> <20180409155433.zxqs2b2k2xzn6kon@earth.universe> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline In-Reply-To: <20180409155433.zxqs2b2k2xzn6kon@earth.universe> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > +static int ti_lmu_bl_add_device(struct ti_lmu_bank *lmu_bank) > > > +{ > > > + switch (lmu_bank->type) { > > > + case TI_LMU_BL: > > > + return ti_lmu_bl_register_backlight(lmu_bank); > > > + case TI_LMU_LED: > > > + return ti_lmu_bl_register_led(lmu_bank); > > > + default: > > > + return -EINVAL; > > > + } > > > +} > >=20 > > Ok, this is somehow unusual/crazy. Single driver with two > > interfaces. > >=20 > > Do we need the LED interface for something? > > > > If yes, I believe reasonable solution would be to always provide LED > > interface, and then have "backlight-trigger" which that would provide > > backlight interface for arbitrary LED. >=20 > Userspace expects keyboard backlight to be exposed via the LED > subsystem and display backlight via the backlight subsystem. Ok. > I considered always exposing the banks via the LED subsystem and > using a generic backlight driver. That brings its own problems, > since there is a dependency between the display and the backlight. > This is described in DT using a phandle. Getting the right backlight > device from the phandle will become very tricky with this approach. I believe we have to do this. Virtually any LED can be used as a backlight, and we don't really want to add two personalities to all the LED drivers. And it should not be too bad: LED will just have default trigger, which will say this LED corresponds to this display device. I believe someone wanted to do that for USB/ethernet activity. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlrMW9wACgkQMOfwapXb+vIkBACfZR1KTKRlSldNfZMrF8WODxgj MYsAn3UeGWYrf6edRoHD6WA/OeY7EWcj =Ma6V -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND--