From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbeAQJdg (ORCPT + 1 other); Wed, 17 Jan 2018 04:33:36 -0500 Received: from mail-it0-f47.google.com ([209.85.214.47]:39188 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752516AbeAQJdb (ORCPT ); Wed, 17 Jan 2018 04:33:31 -0500 X-Google-Smtp-Source: ACJfBouPf1v7nG7Z0nhQ0o305TYxvuehxU+ioxSfM6k23hFiXrOQS6JyqeiKdww7NZRacrjAMv1aBgPmczHvLwIHFOk= MIME-Version: 1.0 In-Reply-To: <1516105859-3525-4-git-send-email-patrice.chotard@st.com> References: <1516105859-3525-1-git-send-email-patrice.chotard@st.com> <1516105859-3525-4-git-send-email-patrice.chotard@st.com> From: Ulf Hansson Date: Wed, 17 Jan 2018 10:33:28 +0100 Message-ID: Subject: Re: [PATCH v2 03/15] mmc: mmci: Don't pretend all variants to have OPENDRAIN bit To: Patrice CHOTARD Cc: Russell King , Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Mark Rutland , Alexandre Torgue , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , linux-clk , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: [...] > /* Busy detection for the ST Micro variant */ > @@ -1455,16 +1465,13 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) > ~MCI_ST_DATA2DIREN); > } > > - if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) { > - if (host->hw_designer != AMBA_VENDOR_ST) > - pwr |= MCI_ROD; > - else { > - /* > - * The ST Micro variant use the ROD bit for something > - * else and only has OD (Open Drain). > - */ > - pwr |= MCI_OD; > - } > + if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN && > + host->variant->opendrain) { A few nitpicks (because I anyway had some comment on patch4): The above can be written on one line and the brackets isn't needed. Replace host->variant->opendrain with variant->opendrain. The same applies to the below change. > + /* > + * The ST Micro variant use the ROD bit for > + * something else and only has OD (Open Drain). > + */ I think we can remove this comment, as this information becomes implicit when we start using the variant data. > + pwr |= host->variant->opendrain; > } > > /* > -- > 1.9.1 > Kind regards Uffe