From mboxrd@z Thu Jan 1 00:00:00 1970 From: Srinivas Kandagatla Subject: Re: [PATCH] nvmem: core: add NVMEM_SYSFS Kconfig Date: Tue, 16 Apr 2019 10:44:01 +0100 Message-ID: <66c3794b-ee84-f746-e686-e5477b78e981@linaro.org> References: <20190415164011.2638-1-srinivas.kandagatla@linaro.org> <3a66797d-347d-2414-14e1-edbcd7c39ae8@codeaurora.org> <20190416093454.GN2654@lahna.fi.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190416093454.GN2654@lahna.fi.intel.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Mika Westerberg , Gaurav Kohli Cc: gregkh@linuxfoundation.org, maxime.ripard@bootlin.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org On 16/04/2019 10:34, Mika Westerberg wrote: > On Tue, Apr 16, 2019 at 10:49:22AM +0530, Gaurav Kohli wrote: >> Hi Srinivas, >> >> Thanks for the patch, >> By default NVMEM_SYSFS should be set true, those whose don't want they can >> disable the same. >> >> If we go with disable option, there are chances of eeprom may break in below >> case: >> >> if (config->compat) { >> rval = nvmem_sysfs_setup_compat(nvmem, config); -> this will >> return error as config is disabled. >> if (rval) >> goto err_device_del; >> } > > I also think this may cause problems with Thunderbolt devices because > the upgradeable NVM is exposed to the userspace via these sysfs files > and those are being used by fwupd. If the files disappear it makes NVM > upgrade somewhat harder ;-) Thanks Mika and Kohli for input. As Kohli suggested we could make NVMEM_SYSFS default to y so that the sysfs file is available by default like before and user/board specific can decide to deselect it. Let me know if thats Okay with you, I can spin that in v2. --srini > > At least it would be good to include following as part of this series if > you plan to disable the sysfs entries by default: > > diff --git a/drivers/thunderbolt/Kconfig b/drivers/thunderbolt/Kconfig > index f4869c38c7e4..dd5facab0af2 100644 > --- a/drivers/thunderbolt/Kconfig > +++ b/drivers/thunderbolt/Kconfig > @@ -7,6 +7,7 @@ menuconfig THUNDERBOLT > select CRYPTO > select CRYPTO_HASH > select NVMEM > + select NVMEM_SYSFS > help > Thunderbolt Controller driver. This driver is required if you > want to hotplug Thunderbolt devices on Apple hardware or on PCs >