Received: by 10.213.65.68 with SMTP id h4csp3370301imn; Tue, 3 Apr 2018 03:51:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx495c9o73kt8JY8XtkYX8s0pEmPJBtdTiQVvTqUfYKnnxtsv1nwND6b3AyWWuXgDXHnl0Edv X-Received: by 10.98.155.137 with SMTP id e9mr10218451pfk.109.1522752662157; Tue, 03 Apr 2018 03:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522752662; cv=none; d=google.com; s=arc-20160816; b=I7e8dF/XUEKpfW0AR7ag+ZaaEo9k53tCJqUfhf+IChTjPFdDCbF9TzbJXEmKowQP6o owG7QtVq3gUgD7MJrnzU9uBM1CYMttoMJ7WViwTkmPpjqHvuJocP17KhChPT7mPheg9T NW3LIbq2DxiBEDAep4+i3923GAA9A+jI5GGlh/KfHKnd6lHjxYpW0gckQKKHW4UiGmd7 kVsI4jsWUX3B6i787RcdtN6Ck4YuJRmK5O1djrQC8WDYO8N7+NNlZtU4O850H4fCdqCU W4AIvaq5rNc3NBCf/u8hSBaAmb1SWhVmaPta2Kle0p3GACyCyVzO8AFH0KbS/3EY+2DU UTxA== 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=TIDUaFg447rbPBpNSvNF6L8CyoPdxB8Ug0cq2YefEfQ=; b=DeRP6Wz9fP6toiCOu9U0OaXS2zpdjnP+hV9WKA2z9nkquLbDsEdKAdWdp0mGzUzFhP YLCqxJh7m1avNq00jjfeGyhcYnoTRLtPfAT7LdHRZb/oFMJTDJhSF+ros4JXvcvZFait wXKmHnfuia1I/7Uh/C5HVH1luhvQYs3tNnlP8pZj9Eg1sAKfXAwsUiaavBnme6DgXykR 3qOmlXQppVHcXc2qIUsZIPRxtI1oRo6d262L2Xlq677WxliLzKARPlZC3SfLadMKFedQ YLHHnOPixVYtjnkKfQrOSs4zurm7mnaqOLTypsE5+9M10yr3Cx7h35ZwZj4Uw6MUxwSp pJow== 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 o66si1978595pfb.0.2018.04.03.03.50.48; Tue, 03 Apr 2018 03:51:02 -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 S1755361AbeDCKtM (ORCPT + 99 others); Tue, 3 Apr 2018 06:49:12 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:54666 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754906AbeDCKtK (ORCPT ); Tue, 3 Apr 2018 06:49:10 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 1CC9380423; Tue, 3 Apr 2018 12:49:09 +0200 (CEST) Date: Tue, 3 Apr 2018 12:49:08 +0200 From: Pavel Machek To: Sebastian Reichel Cc: Sebastian Reichel , 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: <20180403104908.GD6758@amd> References: <20180330172414.26575-1-sebastian.reichel@collabora.co.uk> <20180330172414.26575-9-sebastian.reichel@collabora.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="q9KOos5vDmpwPx9o" Content-Disposition: inline In-Reply-To: <20180330172414.26575-9-sebastian.reichel@collabora.co.uk> 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 --q9KOos5vDmpwPx9o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > +enum ti_lmu_bl_type { > + TI_LMU_BL, /* backlight userspace interface */ > + TI_LMU_LED, /* led userspace interface */ > +}; =2E.. > +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; > + } > +} Ok, this is somehow unusual/crazy. Single driver with two interfaces. 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. Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --q9KOos5vDmpwPx9o Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlrDXCQACgkQMOfwapXb+vKrxACgoI+6g+Ywup+P74KrVtsW0uRh reIAoKNWQS+kZ6NN/TSqi3yN1o0Jwc5b =gQ0H -----END PGP SIGNATURE----- --q9KOos5vDmpwPx9o--