From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH v2 2/2] drm: bridge: adv7511: Add support for ADV7535 Date: Tue, 20 Aug 2019 10:53:29 +0200 Message-ID: <20190820085329.GC11147@phenom.ffwll.local> References: <20190809141611.9927-1-bogdan.togorean@analog.com> <20190809141611.9927-3-bogdan.togorean@analog.com> <20190809152510.GA23265@ravnborg.org> <20190819104616.GA15890@ravnborg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190819104616.GA15890@ravnborg.org> Sender: linux-kernel-owner@vger.kernel.org To: Sam Ravnborg Cc: "Togorean, Bogdan" , "Laurent.pinchart@ideasonboard.com" , "a.hajda@samsung.com" , "airlied@linux.ie" , "gregkh@linuxfoundation.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "allison@lohutok.net" , "tglx@linutronix.de" , "matt.redfearn@thinci.com" , "daniel@ffwll.ch" , "robh+dt@kernel.org" List-Id: dri-devel@lists.freedesktop.org On Mon, Aug 19, 2019 at 12:46:16PM +0200, Sam Ravnborg wrote: > Hi Bogdan. > > > > > adv7533_detach_dsi(adv7511); > > > > i2c_unregister_device(adv7511->i2c_cec); > > > > if (adv7511->cec_clk) > > > > @@ -1266,8 +1278,9 @@ static const struct i2c_device_id > > > > adv7511_i2c_ids[] = { > > > > { "adv7511", ADV7511 }, > > > > { "adv7511w", ADV7511 }, > > > > { "adv7513", ADV7511 }, > > > > -#ifdef CONFIG_DRM_I2C_ADV7533 > > > > +#ifdef CONFIG_DRM_I2C_ADV753x > > > > { "adv7533", ADV7533 }, > > > > + { "adv7535", ADV7535 }, > > > > #endif > > > > > > This ifdef may not be needed?? > > > If we did not get this type we will not look it up. > > But if we have defined in DT adv7533/5 device but > > CONFIG_DRM_I2C_ADV753x not selected probe will fail with ENODEV. That > > would be ok? > > What do we gain from this complexity in the end. > Why not let the driver always support all variants. > > If this result in a simpler driver, and less choices in Kconfig > then it is a win-win. Yeah in general we don't Kconfig within drivers in drm to disable specific code-paths. It's not worth the pain. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch