Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964880AbbGVMRJ (ORCPT ); Wed, 22 Jul 2015 08:17:09 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:33136 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934035AbbGVMRH (ORCPT ); Wed, 22 Jul 2015 08:17:07 -0400 Message-ID: <55AF89BE.3000208@ti.com> Date: Wed, 22 Jul 2015 17:47:02 +0530 From: Kishon Vijay Abraham I User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Ulf Hansson , "Franklin S Cooper Jr." CC: linux-omap , linux-mmc , "linux-kernel@vger.kernel.org" , Roger Quadros , Lokesh Vutla , Murali Karicheri Subject: Re: [PATCH] mmc: omap_hsmmc: Update driver to support without regulators References: <1436902186-6542-1-git-send-email-fcooper@ti.com> <55AEA008.6050808@ti.com> <55AF822F.8060507@ti.com> 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 Content-Length: 1507 Lines: 40 Hi, On Wednesday 22 July 2015 05:37 PM, Ulf Hansson wrote: > [...] > >> Hi Ulf, >> >> Just to clarify do you have an issue with this patch or in general >> you rather nothave !CONFIG_REGULATOR supported? If its the latter >> then wouldit be better to remove the !CONFIG_REGULATOR portion from >> this driver all together. > > I don't like this patch as is, as it seems like you are replacing the > VMMC regulator that actually exist in HW by parsing a DT property. > > I think mmc_of_parse_voltage() shall *only* be used when the OCR mask > (->ocr_avail) can't be fetched by using a regulator. Typically that's > when the VMMC voltage levels are managed within the mmc controller > itself. > > I don't have a strong opinion on how you solve that, but I guess you > have two options. > > 1. > Make sure the driver can be build and used both for CONFIG_REGULATOR > and !CONFIG_REGULATOR. What you need to take care of then, is to > assign the ->ocr_avail mask to a default value in the case when it > can't be fetched from a regulator. Most mmc drivers has some kind of > fall-back mechanism like this. I'm working on cleaning up omap_hsmmc driver where I have taken care to avoid dependency with CONFIG_REGULATOR. I'll post the series asap. Thanks Kishon -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/