[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjsclWsqGX3JrknM@robh.at.kernel.org>
Date: Wed, 23 Mar 2022 08:11:49 -0500
From: Rob Herring <robh@...nel.org>
To: Sui Jingfeng <15330273260@....cn>
Cc: Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Roland Scheidegger <sroland@...are.com>,
Zack Rusin <zackr@...are.com>,
Christian Gmeiner <christian.gmeiner@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Dan Carpenter <dan.carpenter@...cle.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Andrey Zhizhikin <andrey.zhizhikin@...ca-geosystems.com>,
Sam Ravnborg <sam@...nborg.org>,
"David S . Miller" <davem@...emloft.net>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Lucas Stach <l.stach@...gutronix.de>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Ilia Mirkin <imirkin@...m.mit.edu>,
Qing Zhang <zhangqing@...ngson.cn>,
suijingfeng <suijingfeng@...ngson.cn>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, dri-devel@...ts.freedesktop.org,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v11 7/7] drm/lsdc: add drm driver for loongson display
controller
On Wed, Mar 23, 2022 at 12:12:43PM +0800, Sui Jingfeng wrote:
>
> On 2022/3/23 04:49, Rob Herring wrote:
> > > +/*
> > > + * mainly for dc in ls7a1000 which have builtin gpio emulated i2c
> > > + *
> > > + * @index : output channel index, 0 for DVO0, 1 for DVO1
> > > + */
> > > +struct lsdc_i2c *lsdc_create_i2c_chan(struct device *dev, void *base, unsigned int index)
> > > +{
> > > + char compat[32] = {0};
> > > + unsigned int udelay = 5;
> > > + unsigned int timeout = 2200;
> > > + int nr = -1;
> > > + struct i2c_adapter *adapter;
> > > + struct lsdc_i2c *li2c;
> > > + struct device_node *i2c_np;
> > > + int ret;
> > > +
> > > + li2c = devm_kzalloc(dev, sizeof(*li2c), GFP_KERNEL);
> > > + if (!li2c)
> > > + return ERR_PTR(-ENOMEM);
> > > +
> > > + li2c->index = index;
> > > + li2c->dev = dev;
> > > +
> > > + if (index == 0) {
> > > + li2c->sda = 0x01;
> > > + li2c->scl = 0x02;
> > > + } else if (index == 1) {
> > > + li2c->sda = 0x04;
> > > + li2c->scl = 0x08;
> > Just require this to be in DT rather than having some default.
> >
> By design, I am try very hard to let the code NOT fully DT dependent. DT is nice , easy to learn and use.
> But kernel side developer plan to follow UEFI + ACPI Specification on LS3A5000 + LS7A1000 platform. See [1]
> There will no DT support then, provide a convention support make the driver more flexible. I want the
> driver works with minimal requirement. The driver just works on simple boards by put the following dc device
> node in arch/mips/dts/loongson/loongson64g_4core_ls7a.dts,
Pick DT or ACPI for the platform, not both. We don't need to have both
in the kernel to support.
Rob
Powered by blists - more mailing lists