Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect*

twl6030_mmc_card_detect() and twl6030_mmc_card_detect_config() have been
unused since 2013's commit b2ff4790612b ("ARM: OMAP2+: Remove legacy
omap4_twl6030_hsmmc_init")

Remove them.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250607202232.265344-1-linux@treblig.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Dr. David Alan Gilbert and committed by
Lee Jones
fe473fba 5d005cf7

-95
-74
drivers/mfd/twl6030-irq.c
··· 256 256 } 257 257 EXPORT_SYMBOL(twl6030_interrupt_mask); 258 258 259 - int twl6030_mmc_card_detect_config(void) 260 - { 261 - int ret; 262 - u8 reg_val = 0; 263 - 264 - /* Unmasking the Card detect Interrupt line for MMC1 from Phoenix */ 265 - twl6030_interrupt_unmask(TWL6030_MMCDETECT_INT_MASK, 266 - REG_INT_MSK_LINE_B); 267 - twl6030_interrupt_unmask(TWL6030_MMCDETECT_INT_MASK, 268 - REG_INT_MSK_STS_B); 269 - /* 270 - * Initially Configuring MMC_CTRL for receiving interrupts & 271 - * Card status on TWL6030 for MMC1 272 - */ 273 - ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, &reg_val, TWL6030_MMCCTRL); 274 - if (ret < 0) { 275 - pr_err("twl6030: Failed to read MMCCTRL, error %d\n", ret); 276 - return ret; 277 - } 278 - reg_val &= ~VMMC_AUTO_OFF; 279 - reg_val |= SW_FC; 280 - ret = twl_i2c_write_u8(TWL6030_MODULE_ID0, reg_val, TWL6030_MMCCTRL); 281 - if (ret < 0) { 282 - pr_err("twl6030: Failed to write MMCCTRL, error %d\n", ret); 283 - return ret; 284 - } 285 - 286 - /* Configuring PullUp-PullDown register */ 287 - ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, &reg_val, 288 - TWL6030_CFG_INPUT_PUPD3); 289 - if (ret < 0) { 290 - pr_err("twl6030: Failed to read CFG_INPUT_PUPD3, error %d\n", 291 - ret); 292 - return ret; 293 - } 294 - reg_val &= ~(MMC_PU | MMC_PD); 295 - ret = twl_i2c_write_u8(TWL6030_MODULE_ID0, reg_val, 296 - TWL6030_CFG_INPUT_PUPD3); 297 - if (ret < 0) { 298 - pr_err("twl6030: Failed to write CFG_INPUT_PUPD3, error %d\n", 299 - ret); 300 - return ret; 301 - } 302 - 303 - return irq_find_mapping(twl6030_irq->irq_domain, 304 - MMCDETECT_INTR_OFFSET); 305 - } 306 - EXPORT_SYMBOL(twl6030_mmc_card_detect_config); 307 - 308 - int twl6030_mmc_card_detect(struct device *dev, int slot) 309 - { 310 - int ret = -EIO; 311 - u8 read_reg = 0; 312 - struct platform_device *pdev = to_platform_device(dev); 313 - 314 - if (pdev->id) { 315 - /* TWL6030 provide's Card detect support for 316 - * only MMC1 controller. 317 - */ 318 - pr_err("Unknown MMC controller %d in %s\n", pdev->id, __func__); 319 - return ret; 320 - } 321 - /* 322 - * BIT0 of MMC_CTRL on TWL6030 provides card status for MMC1 323 - * 0 - Card not present ,1 - Card present 324 - */ 325 - ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, &read_reg, 326 - TWL6030_MMCCTRL); 327 - if (ret >= 0) 328 - ret = read_reg & STS_MMC; 329 - return ret; 330 - } 331 - EXPORT_SYMBOL(twl6030_mmc_card_detect); 332 - 333 259 static int twl6030_irq_map(struct irq_domain *d, unsigned int virq, 334 260 irq_hw_number_t hwirq) 335 261 {
-21
include/linux/mfd/twl.h
··· 205 205 int twl6030_interrupt_unmask(u8 bit_mask, u8 offset); 206 206 int twl6030_interrupt_mask(u8 bit_mask, u8 offset); 207 207 208 - /* Card detect Configuration for MMC1 Controller on OMAP4 */ 209 - #ifdef CONFIG_TWL4030_CORE 210 - int twl6030_mmc_card_detect_config(void); 211 - #else 212 - static inline int twl6030_mmc_card_detect_config(void) 213 - { 214 - pr_debug("twl6030_mmc_card_detect_config not supported\n"); 215 - return 0; 216 - } 217 - #endif 218 - 219 - /* MMC1 Controller on OMAP4 uses Phoenix irq for Card detect */ 220 - #ifdef CONFIG_TWL4030_CORE 221 - int twl6030_mmc_card_detect(struct device *dev, int slot); 222 - #else 223 - static inline int twl6030_mmc_card_detect(struct device *dev, int slot) 224 - { 225 - pr_debug("Call back twl6030_mmc_card_detect not supported\n"); 226 - return -EIO; 227 - } 228 - #endif 229 208 /*----------------------------------------------------------------------*/ 230 209 231 210 /*