All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	martin@kaiser.cx, fmdefrancesco@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Michael Straube <straube.linux@gmail.com>
Subject: [PATCH v3 23/40] staging: r8188eu: remove wrapper Efuse_PowerSwitch()
Date: Mon,  6 Sep 2021 21:02:06 +0200	[thread overview]
Message-ID: <20210906190223.11396-24-straube.linux@gmail.com> (raw)
In-Reply-To: <20210906190223.11396-1-straube.linux@gmail.com>

Remove wrapper Efuse_PowerSwitch() and call rtl8188e_EfusePowerSwitch()
directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c    | 55 ++++++---------------
 drivers/staging/r8188eu/core/rtw_mp_ioctl.c |  8 +--
 drivers/staging/r8188eu/include/rtw_efuse.h |  1 -
 3 files changed, 18 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 8388ec60d21d..1aeddfa2f14d 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -58,33 +58,6 @@ Efuse_Write1ByteToFakeContent(
 	return true;
 }
 
-/*-----------------------------------------------------------------------------
- * Function:	Efuse_PowerSwitch
- *
- * Overview:	When we want to enable write operation, we should change to
- *				pwr on state. When we stop write, we should switch to 500k mode
- *				and disable LDO 2.5V.
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When			Who		Remark
- * 11/17/2008	MHC		Create Version 0.
- *
- *---------------------------------------------------------------------------*/
-void
-Efuse_PowerSwitch(
-		struct adapter *pAdapter,
-		u8 write,
-		u8 PwrState)
-{
-	rtl8188e_EfusePowerSwitch(pAdapter, write, PwrState);
-}
-
 /*-----------------------------------------------------------------------------
  * Function:	efuse_GetCurrentSize
  *
@@ -431,7 +404,7 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
 		rw8 = &efuse_read8;
 	}
 
-	Efuse_PowerSwitch(padapter, write, true);
+	rtl8188e_EfusePowerSwitch(padapter, write, true);
 
 	/*  e-fuse one byte read / write */
 	for (i = 0; i < cnts; i++) {
@@ -445,7 +418,7 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
 			break;
 	}
 
-	Efuse_PowerSwitch(padapter, write, false);
+	rtl8188e_EfusePowerSwitch(padapter, write, false);
 
 	return res;
 }
@@ -459,9 +432,9 @@ u16 efuse_GetMaxSize(struct adapter *padapter)
 /*  */
 u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
 {
-	Efuse_PowerSwitch(padapter, false, true);
+	rtl8188e_EfusePowerSwitch(padapter, false, true);
 	*size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false);
-	Efuse_PowerSwitch(padapter, false, false);
+	rtl8188e_EfusePowerSwitch(padapter, false, false);
 
 	return _SUCCESS;
 }
@@ -475,11 +448,11 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 	if ((addr + cnts) > mapLen)
 		return _FAIL;
 
-	Efuse_PowerSwitch(padapter, false, true);
+	rtl8188e_EfusePowerSwitch(padapter, false, true);
 
 	efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
 
-	Efuse_PowerSwitch(padapter, false, false);
+	rtl8188e_EfusePowerSwitch(padapter, false, false);
 
 	return _SUCCESS;
 }
@@ -493,11 +466,11 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 	if ((addr + cnts) > mapLen)
 		return _FAIL;
 
-	Efuse_PowerSwitch(padapter, false, true);
+	rtl8188e_EfusePowerSwitch(padapter, false, true);
 
 	efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
 
-	Efuse_PowerSwitch(padapter, false, false);
+	rtl8188e_EfusePowerSwitch(padapter, false, false);
 
 	return _SUCCESS;
 }
@@ -524,7 +497,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 	if (ret == _FAIL)
 		goto exit;
 
-	Efuse_PowerSwitch(padapter, true, true);
+	rtl8188e_EfusePowerSwitch(padapter, true, true);
 
 	offset = (addr >> 3);
 	word_en = 0xF;
@@ -587,7 +560,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 		memset(newdata, 0xFF, PGPKT_DATA_SIZE);
 	} while (1);
 
-	Efuse_PowerSwitch(padapter, true, false);
+	rtl8188e_EfusePowerSwitch(padapter, true, false);
 exit:
 	kfree(map);
 	return ret;
@@ -616,7 +589,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
 	if (ret == _FAIL)
 		goto exit;
 
-	Efuse_PowerSwitch(padapter, true, true);
+	rtl8188e_EfusePowerSwitch(padapter, true, true);
 
 	offset = (addr >> 3);
 	word_en = 0xF;
@@ -679,7 +652,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
 		memset(newdata, 0xFF, PGPKT_DATA_SIZE);
 	} while (1);
 
-	Efuse_PowerSwitch(padapter, true, false);
+	rtl8188e_EfusePowerSwitch(padapter, true, false);
 
 exit:
 
@@ -768,13 +741,13 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse,
 {
 	u16 mapLen = 0;
 
-	Efuse_PowerSwitch(pAdapter, false, true);
+	rtl8188e_EfusePowerSwitch(pAdapter, false, true);
 
 	EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
 
 	efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo);
 
-	Efuse_PowerSwitch(pAdapter, false, false);
+	rtl8188e_EfusePowerSwitch(pAdapter, false, false);
 }
 
 /*-----------------------------------------------------------------------------
diff --git a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
index c85f8e467337..7cb3f55ff58e 100644
--- a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
+++ b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
@@ -973,19 +973,19 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
 	_irqlevel_changed_(&oldirql, LOWER);
 
 	if (poid_par_priv->type_of_oid == QUERY_OID) {
-		Efuse_PowerSwitch(Adapter, false, true);
+		rtl8188e_EfusePowerSwitch(Adapter, false, true);
 		if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, false))
 			*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
 		else
 			status = NDIS_STATUS_FAILURE;
-		Efuse_PowerSwitch(Adapter, false, false);
+		rtl8188e_EfusePowerSwitch(Adapter, false, false);
 	} else {
-		Efuse_PowerSwitch(Adapter, true, true);
+		rtl8188e_EfusePowerSwitch(Adapter, true, true);
 		if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false))
 			*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
 		else
 			status = NDIS_STATUS_FAILURE;
-		Efuse_PowerSwitch(Adapter, true, false);
+		rtl8188e_EfusePowerSwitch(Adapter, true, false);
 	}
 
 	_irqlevel_changed_(&oldirql, RAISE);
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index b3ff46db2091..18fb9a4d9a0e 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -119,7 +119,6 @@ void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1,
 u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
 u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool	test);
 
-void Efuse_PowerSwitch(struct adapter *adapt,u8 bWrite,u8  PwrState);
 int Efuse_PgPacketRead(struct adapter *adapt, u8 offset, u8 *data, bool test);
 int Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data,
 			bool test);
-- 
2.33.0


  parent reply	other threads:[~2021-09-06 19:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 19:01 [PATCH v3 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
2021-09-06 19:01 ` [PATCH v3 01/40] staging: r8188eu: remove InitSwLeds from hal_ops Michael Straube
2021-09-06 19:01 ` [PATCH v3 02/40] staging: r8188eu: remove DeInitSwLeds " Michael Straube
2021-09-06 19:01 ` [PATCH v3 03/40] staging: r8188eu: remove dm_init " Michael Straube
2021-09-06 19:01 ` [PATCH v3 04/40] staging: r8188eu: remove dm_deinit " Michael Straube
2021-09-06 19:01 ` [PATCH v3 05/40] staging: r8188eu: remove SetHalODMVarHandler " Michael Straube
2021-09-06 19:01 ` [PATCH v3 06/40] staging: r8188eu: remove empty functions Michael Straube
2021-09-06 19:01 ` [PATCH v3 07/40] staging: r8188eu: remove unused function rtw_interface_ps_func() Michael Straube
2021-09-06 19:01 ` [PATCH v3 08/40] staging: r8188eu: remove interface_ps_func from hal_ops Michael Straube
2021-09-06 19:01 ` [PATCH v3 09/40] staging: r8188eu: remove hal_dm_watchdog " Michael Straube
2021-09-06 19:01 ` [PATCH v3 10/40] staging: r8188eu: remove set_bwmode_handler " Michael Straube
2021-09-06 19:01 ` [PATCH v3 11/40] staging: r8188eu: remove set_channel_handler " Michael Straube
2021-09-06 19:01 ` [PATCH v3 12/40] staging: r8188eu: remove unused enum hal_intf_ps_func Michael Straube
2021-09-06 19:01 ` [PATCH v3 13/40] staging: r8188eu: remove Add_RateATid from hal_ops Michael Straube
2021-09-06 19:01 ` [PATCH v3 14/40] staging: r8188eu: remove hal_power_on " Michael Straube
2021-09-06 19:01 ` [PATCH v3 15/40] staging: r8188eu: remove sreset_init_value " Michael Straube
2021-09-06 19:01 ` [PATCH v3 16/40] staging: r8188eu: remove sreset_reset_value " Michael Straube
2021-09-06 19:02 ` [PATCH v3 17/40] staging: r8188eu: remove silentreset " Michael Straube
2021-09-06 19:02 ` [PATCH v3 18/40] staging: r8188eu: remove sreset_xmit_status_check " Michael Straube
2021-09-06 19:02 ` [PATCH v3 19/40] staging: r8188eu: remove sreset_linked_status_check " Michael Straube
2021-09-06 19:02 ` [PATCH v3 20/40] staging: r8188eu: remove sreset_get_wifi_status " Michael Straube
2021-09-06 19:02 ` [PATCH v3 21/40] staging: r8188eu: remove EfusePowerSwitch " Michael Straube
2021-09-06 19:02 ` [PATCH v3 22/40] staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E() Michael Straube
2021-09-06 19:02 ` Michael Straube [this message]
2021-09-06 19:02 ` [PATCH v3 24/40] staging: r8188eu: remove ReadEFuse from hal_ops Michael Straube
2021-09-06 19:02 ` [PATCH v3 25/40] staging: r8188eu: remove EFUSEGetEfuseDefinition " Michael Straube
2021-09-06 19:02 ` [PATCH v3 26/40] staging: r8188eu: remove EfuseGetCurrentSize " Michael Straube
2021-09-06 19:02 ` [PATCH v3 27/40] staging: r8188eu: remove empty comments Michael Straube
2021-09-06 19:02 ` [PATCH v3 28/40] staging: r8188eu: remove Efuse_PgPacketRead from hal_ops Michael Straube
2021-09-06 19:02 ` [PATCH v3 29/40] staging: r8188eu: remove Efuse_PgPacketWrite " Michael Straube
2021-09-06 19:02 ` [PATCH v3 30/40] staging: r8188eu: remove Efuse_WordEnableDataWrite " Michael Straube
2021-09-06 19:02 ` [PATCH v3 31/40] staging: r8188eu: remove useless assignment Michael Straube
2021-09-06 19:02 ` [PATCH v3 32/40] staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops Michael Straube
2021-09-06 19:02 ` [PATCH v3 33/40] staging: r8188eu: remove AntDivCompareHandler " Michael Straube
2021-09-06 19:02 ` [PATCH v3 34/40] staging: r8188eu: remove empty function rtl8188e_start_thread() Michael Straube
2021-09-06 19:02 ` [PATCH v3 35/40] staging: r8188eu: remove empty function rtl8188e_stop_thread() Michael Straube
2021-09-06 19:02 ` [PATCH v3 36/40] staging: r8188eu: remove hal_notch_filter from hal_ops Michael Straube
2021-09-06 19:02 ` [PATCH v3 37/40] staging: r8188eu: remove free_hal_data " Michael Straube
2021-09-06 19:02 ` [PATCH v3 38/40] staging: r8188eu: remove unused function rtl8188e_clone_haldata() Michael Straube
2021-09-06 19:02 ` [PATCH v3 39/40] staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops Michael Straube
2021-09-06 19:02 ` [PATCH v3 40/40] staging: r8188eu: remove UpdateHalRAMask8188EUsb " Michael Straube
2021-09-06 22:57 ` [PATCH v3 00/40] staging: r8188eu: remove function pointers from struct hal_ops Kari Argillander
2021-09-07  5:00   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210906190223.11396-24-straube.linux@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.