lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131115162238.GA3638@lee--X1>
Date:	Fri, 15 Nov 2013 16:22:38 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	micky_ching@...lsil.com.cn
Cc:	sameo@...ux.intel.com, devel@...uxdriverproject.org,
	linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
	wei_wang@...lsil.com.cn, rogerable@...ltek.com
Subject: Re: [PATCH 2/3] mfd: rtsx: add card reader rtl8402

On Fri, 15 Nov 2013, micky_ching@...lsil.com.cn wrote:

> From: Micky Ching <micky_ching@...lsil.com.cn>
> 
> Add card reader rtl8042, rtl8402 is much like rtl8411, so just add it to
> rtl8411.c
> 
> Signed-off-by: Micky Ching <micky_ching@...lsil.com.cn>
> ---
>  drivers/mfd/rtl8411.c  |   29 +++++++++++++++++++++++++++++
>  drivers/mfd/rtsx_pcr.c |    2 ++
>  2 files changed, 31 insertions(+)

Looks like you left me off of the addressee list for this and the
cover letter.

> diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c
> index 4de1045..8e4b546 100644
> --- a/drivers/mfd/rtl8411.c
> +++ b/drivers/mfd/rtl8411.c
> @@ -216,6 +216,31 @@ static int rtl8411_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage)
>  	return rtsx_pci_write_register(pcr, LDO_CTL, mask, val);
>  }
>  
> +static int rtl8402_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage)
> +{
> +	u8 mask, val;
> +	int err;
> +
> +	mask = (BPP_REG_TUNED18 << BPP_TUNED18_SHIFT_8402) | BPP_PAD_MASK;
> +	if (voltage == OUTPUT_3V3) {
> +		err = rtsx_pci_write_register(pcr,
> +				SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_3v3);
> +		if (err < 0)
> +			return err;
> +		val = (BPP_ASIC_3V3 << BPP_TUNED18_SHIFT_8402) | BPP_PAD_3V3;
> +	} else if (voltage == OUTPUT_1V8) {
> +		err = rtsx_pci_write_register(pcr,
> +				SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_1v8);
> +		if (err < 0)
> +			return err;
> +		val = (BPP_ASIC_2V0 << BPP_TUNED18_SHIFT_8402) | BPP_PAD_1V8;
> +	} else {
> +		return -EINVAL;
> +	}
> +
> +	return rtsx_pci_write_register(pcr, LDO_CTL, mask, val);
> +}
> +
>  static unsigned int rtl8411_cd_deglitch(struct rtsx_pcr *pcr)
>  {
>  	unsigned int card_exist;
> @@ -460,6 +485,10 @@ void rtl8411_init_params(struct rtsx_pcr *pcr)
>  			set_pull_ctrl_tables(rtl8411b_qfn64);
>  
>  		break;
> +	case 0x5286:
> +		rtl8411_pcr_ops.switch_output_voltage =
> +			rtl8402_switch_output_voltage;
> +		break;
>  	}
>  
>  	pcr->ops = &rtl8411_pcr_ops;
> diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
> index ecc6852..865d209 100644
> --- a/drivers/mfd/rtsx_pcr.c
> +++ b/drivers/mfd/rtsx_pcr.c
> @@ -57,6 +57,7 @@ static DEFINE_PCI_DEVICE_TABLE(rtsx_pci_ids) = {
>  	{ PCI_DEVICE(0x10EC, 0x5227), PCI_CLASS_OTHERS << 16, 0xFF0000 },
>  	{ PCI_DEVICE(0x10EC, 0x5249), PCI_CLASS_OTHERS << 16, 0xFF0000 },
>  	{ PCI_DEVICE(0x10EC, 0x5287), PCI_CLASS_OTHERS << 16, 0xFF0000 },
> +	{ PCI_DEVICE(0x10EC, 0x5286), PCI_CLASS_OTHERS << 16, 0xFF0000 },
>  	{ 0, }
>  };
>  
> @@ -1056,6 +1057,7 @@ static int rtsx_pci_init_chip(struct rtsx_pcr *pcr)
>  
>  	case 0x5287:
>  	case 0x5289:
> +	case 0x5286:
>  		rtl8411_init_params(pcr);
>  		break;
>  	}

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ