From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753271AbcBENVG (ORCPT ); Fri, 5 Feb 2016 08:21:06 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:35872 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbcBENVE (ORCPT ); Fri, 5 Feb 2016 08:21:04 -0500 Subject: Re: [PATCH 4/4] ARM: davinci: make I2C support optional To: Arnd Bergmann , Kevin Hilman References: <1454358962-640598-1-git-send-email-arnd@arndb.de> <1454358962-640598-5-git-send-email-arnd@arndb.de> CC: , From: Sekhar Nori Message-ID: <56B4A19D.4060307@ti.com> Date: Fri, 5 Feb 2016 18:50:29 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1454358962-640598-5-git-send-email-arnd@arndb.de> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 02 February 2016 02:05 AM, Arnd Bergmann wrote: > The davinci platform has tried to get support for the EEPROM right, > but failed to get a clean build so far. At the moment, we get > a warning whenever CONFIG_SYSFS is disabled, as that is needed by > EEPROM_AT24: > > warning: (MACH_DAVINCI_EVM && MACH_SFFSDR && MACH_DAVINCI_DM6467_EVM && MACH_DAVINCI_DM365_EVM && MACH_DAVINCI_DA830_EVM && MACH_MITYOMAPL138 && MACH_MINI2440) selects EEPROM_AT24 which has unmet direct dependencies (I2C && SYSFS) > > Kevin Hilman initially added the 'select' to ensure that EEPROM_AT24 > is always enabled in machines that really want it for normal operation > (i.e. for reading the MAC address). This broke when I2C was disabled, > and Russell King followed up with another patch to select that as > well. > > I now see that the SYSFS dependency is still missing, which leaves > us with three options: > > a) add 'select SYSFS' in addition to the others > b) change AT24_EEPPROM to work without sysfs (should be possible) > c) remove all those selects again and get the files to build when > I2C is disabled. > > I would really hate to do a) because adding select statements that > hardwire user-selectable symbols is generally a bad idea. I first > tried b) but then ended up redoing the patch from scratch to approach > c), so we can also remove the other selects. > > I checked that CONFIG_I2C is still enabled with davinci_all_defconfig, > so that does not have to change. > > Signed-off-by: Arnd Bergmann > Fixes: 45b146d746ea ("ARM: Davinci: Fix I2C build errors") > Fixes: 22ca466847ad ("davinci: kconfig: select at24 eeprom for selected boards") This looks good to me. The #ifdefs in the middle of davinci_evm_init() are an eyesore, but getting rid of the selects is a big plus. Thanks, Sekhar