From patchwork Mon Feb 4 13:08:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremie Samuel X-Patchwork-Id: 2091771 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id EAE7D3FD56 for ; Mon, 4 Feb 2013 13:10:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754803Ab3BDNK5 (ORCPT ); Mon, 4 Feb 2013 08:10:57 -0500 Received: from co202.xi-lite.net ([149.6.83.202]:48646 "EHLO co202.xi-lite.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754277Ab3BDNK4 (ORCPT ); Mon, 4 Feb 2013 08:10:56 -0500 Received: from ONYX.xi-lite.lan (unknown [193.34.35.244]) by co202.xi-lite.net (Postfix) with ESMTPS id 50982260359 for ; Mon, 4 Feb 2013 14:26:12 +0100 (CET) Received: from [172.20.88.123] (84.14.91.202) by mail.xi-lite.com (193.34.32.105) with Microsoft SMTP Server (TLS) id 8.1.336.0; Mon, 4 Feb 2013 13:16:08 +0000 Message-ID: <510FB2CC.20201@parrot.com> Date: Mon, 4 Feb 2013 14:08:28 +0100 From: Jeremie Samuel User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.11) Gecko/20121123 Icedove/10.0.11 MIME-Version: 1.0 To: "linux-mmc@vger.kernel.org" Subject: Control drive strength in software Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Hi, I'm working on a SDHCI driver for linux kernel 3.4. The IP that I have to control does not control the Driver Strength. Driver Type B is always selected. On the other hand, I can control the drive strength of the pads in software. I would like to use the interface select_drive_strength of the mmc_host_ops. Is it a good idea? If so, I have an other issue. This function doesn't have an mmc_host as parameter. It is an issue for me since the drive strength parameters can be board specific. A solution would be to add this parameter: void (*hw_reset)(struct mmc_host *host); }; Is this solution a good idea? Also, the drive strength configuration might be different according to the mode (not only UHS). So, I would like to control the drive strength for the default speed and the high speed. Would it be relevant to add this a call to this function in mmc_sd_switch_hs or in mmc_sd_init_card? Thanks, Jeremie Samuel --- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 5674504..cb6d117 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -134,7 +134,7 @@ struct mmc_host_ops { /* The tuning command opcode value is different for SD and eMMC cards */ int (*execute_tuning)(struct mmc_host *host, u32 opcode); void (*enable_preset_value)(struct mmc_host *host, bool enable); - int (*select_drive_strength)(unsigned int max_dtr, int host_drv, int card_drv); + int (*select_drive_strength)(struct mmc_host *host, unsigned int max_dtr, int host_drv, int card_drv);