From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751816AbdFKFUv (ORCPT ); Sun, 11 Jun 2017 01:20:51 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:13981 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751763AbdFKFUt (ORCPT ); Sun, 11 Jun 2017 01:20:49 -0400 Subject: Re: [PATCH v2] mfd: tps65217: Introduce dependency on CONFIG_OF To: Javier Martinez Canillas References: <1496918764-23438-1-git-send-email-j-keerthy@ti.com> <481f45bd-7970-7254-6c38-654e412e4f9c@ti.com> CC: Enric Balletbo Serra , Lee Jones , Tony Lindgren , Mark Brown , Jingoo Han , Bartlomiej Zolnierkiewicz , Tero Kristo , linux-kernel , "linux-omap@vger.kernel.org" From: Keerthy Message-ID: <31c8a0f3-885e-c464-f597-29d3894c19f9@ti.com> Date: Sun, 11 Jun 2017 10:50:30 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 09 June 2017 05:18 AM, Javier Martinez Canillas wrote: > On Fri, Jun 9, 2017 at 1:18 AM, Keerthy wrote: > > [snip] > >>> >>>>> >>>>> -static const struct i2c_device_id tps65217_id_table[] = { >>>>> - {"tps65217", TPS65217}, >>>>> - { /* sentinel */ } >>>>> -}; >>>>> -MODULE_DEVICE_TABLE(i2c, tps65217_id_table); >>> >>> Unfortunately you can't get rid of this table (yet) since the I2C >>> subsystem always reports a MODALIAS of the form "i2c:tps65217" even >>> when the devices have been registered via OF. There are only a couple >>> of drivers more to clean-up and then I'll post a patch that fixes the >>> I2C core to report a proper OF modalias. But for now, removing will >>> mean that module autoload will be broken for this driver. >> >> So this means whole logic of probe_new without i2c_device_id is not >> ready? I will have to revert all that logic right? >> > > No, that's not what I meant. > > It's absolutely correct for drivers that can't be build as a module > (i.e: have a boolean instead of tristate Kconfig symbol) or if you > want to get rid of the struct i2c_device_id pointed passed to your > probe callback since isn't used in the driver. > > But it's not enough to get rid of the struct i2c_device_id table for > the reason I mentioned before. Thanks for clarifying! > >> Lee Jones, >> >> Does that mean even for LP87565 driver we need MODULE_DEVICE_TABLE for >> module autoload? >> > > I guess you are talking about [0], right? > > Yes, it's needed because the driver can be built as a module. Okay. > > [0]: https://lkml.org/lkml/2017/5/19/394 > > Best regards, > Javier >