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

rtc: bd70528: add BD71828 support

ROHM BD71828 PMIC RTC block is from many parts similar to one
on BD70528. Support BD71828 RTC using BD70528 RTC driver and
avoid re-inventing the wheel.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Matti Vaittinen and committed by
Lee Jones
fe5a591b 6c883472

+206 -55
+2 -1
drivers/rtc/Kconfig
··· 498 498 help 499 499 If you say Y here you will get support for the 500 500 watchdog timer in the ST M41T60 and M41T80 RTC chips series. 501 + 501 502 config RTC_DRV_BD70528 502 503 tristate "ROHM BD70528 PMIC RTC" 503 504 depends on MFD_ROHM_BD70528 && (BD70528_WATCHDOG || !BD70528_WATCHDOG) 504 505 help 505 506 If you say Y here you will get support for the RTC 506 - on ROHM BD70528 Power Management IC. 507 + block on ROHM BD70528 and BD71828 Power Management IC. 507 508 508 509 This driver can also be built as a module. If so, the module 509 510 will be called rtc-bd70528.
+179 -41
drivers/rtc/rtc-bd70528.c
··· 6 6 7 7 #include <linux/bcd.h> 8 8 #include <linux/mfd/rohm-bd70528.h> 9 + #include <linux/mfd/rohm-bd71828.h> 9 10 #include <linux/module.h> 10 11 #include <linux/of.h> 11 12 #include <linux/platform_device.h> ··· 16 15 /* 17 16 * We read regs RTC_SEC => RTC_YEAR 18 17 * this struct is ordered according to chip registers. 19 - * Keep it u8 only to avoid padding issues. 18 + * Keep it u8 only (or packed) to avoid padding issues. 20 19 */ 21 20 struct bd70528_rtc_day { 22 21 u8 sec; ··· 37 36 u8 ctrl; 38 37 } __packed; 39 38 39 + struct bd71828_rtc_alm { 40 + struct bd70528_rtc_data alm0; 41 + struct bd70528_rtc_data alm1; 42 + u8 alm_mask; 43 + u8 alm1_mask; 44 + } __packed; 45 + 40 46 struct bd70528_rtc_alm { 41 47 struct bd70528_rtc_data data; 42 48 u8 alm_mask; ··· 51 43 } __packed; 52 44 53 45 struct bd70528_rtc { 54 - struct rohm_regmap_dev *mfd; 46 + struct rohm_regmap_dev *parent; 55 47 struct device *dev; 48 + u8 reg_time_start; 49 + bool has_rtc_timers; 56 50 }; 57 51 58 52 static int bd70528_set_wake(struct rohm_regmap_dev *bd70528, ··· 133 123 { 134 124 int ret; 135 125 136 - ret = bd70528_wdt_set(r->mfd, new_state & BD70528_WDT_STATE_BIT, 126 + ret = bd70528_wdt_set(r->parent, new_state & BD70528_WDT_STATE_BIT, 137 127 old_state); 138 128 if (ret) { 139 129 dev_err(r->dev, 140 130 "Failed to disable WDG for RTC setting (%d)\n", ret); 141 131 return ret; 142 132 } 143 - ret = bd70528_set_elapsed_tmr(r->mfd, 133 + ret = bd70528_set_elapsed_tmr(r->parent, 144 134 new_state & BD70528_ELAPSED_STATE_BIT, 145 135 old_state); 146 136 if (ret) { ··· 148 138 "Failed to disable 'elapsed timer' for RTC setting\n"); 149 139 return ret; 150 140 } 151 - ret = bd70528_set_wake(r->mfd, new_state & BD70528_WAKE_STATE_BIT, 141 + ret = bd70528_set_wake(r->parent, new_state & BD70528_WAKE_STATE_BIT, 152 142 old_state); 153 143 if (ret) { 154 144 dev_err(r->dev, ··· 162 152 static int bd70528_re_enable_rtc_based_timers(struct bd70528_rtc *r, 163 153 int old_state) 164 154 { 155 + if (!r->has_rtc_timers) 156 + return 0; 157 + 165 158 return bd70528_set_rtc_based_timers(r, old_state, NULL); 166 159 } 167 160 168 161 static int bd70528_disable_rtc_based_timers(struct bd70528_rtc *r, 169 162 int *old_state) 170 163 { 164 + if (!r->has_rtc_timers) 165 + return 0; 166 + 171 167 return bd70528_set_rtc_based_timers(r, 0, old_state); 172 168 } 173 169 ··· 229 213 t->tm_wday = bcd2bin(r->week & BD70528_MASK_RTC_WEEK); 230 214 } 231 215 216 + static int bd71828_set_alarm(struct device *dev, struct rtc_wkalrm *a) 217 + { 218 + int ret; 219 + struct bd71828_rtc_alm alm; 220 + struct bd70528_rtc *r = dev_get_drvdata(dev); 221 + struct rohm_regmap_dev *parent = r->parent; 222 + 223 + ret = regmap_bulk_read(parent->regmap, BD71828_REG_RTC_ALM_START, 224 + &alm, sizeof(alm)); 225 + if (ret) { 226 + dev_err(dev, "Failed to read alarm regs\n"); 227 + return ret; 228 + } 229 + 230 + tm2rtc(&a->time, &alm.alm0); 231 + 232 + if (!a->enabled) 233 + alm.alm_mask &= ~BD70528_MASK_ALM_EN; 234 + else 235 + alm.alm_mask |= BD70528_MASK_ALM_EN; 236 + 237 + ret = regmap_bulk_write(parent->regmap, BD71828_REG_RTC_ALM_START, 238 + &alm, sizeof(alm)); 239 + if (ret) 240 + dev_err(dev, "Failed to set alarm time\n"); 241 + 242 + return ret; 243 + 244 + } 245 + 232 246 static int bd70528_set_alarm(struct device *dev, struct rtc_wkalrm *a) 233 247 { 234 248 struct bd70528_rtc_wake wake; 235 249 struct bd70528_rtc_alm alm; 236 250 int ret; 237 251 struct bd70528_rtc *r = dev_get_drvdata(dev); 238 - struct rohm_regmap_dev *bd70528 = r->mfd; 252 + struct rohm_regmap_dev *parent = r->parent; 239 253 240 - ret = regmap_bulk_read(bd70528->regmap, BD70528_REG_RTC_WAKE_START, 254 + ret = regmap_bulk_read(parent->regmap, BD70528_REG_RTC_WAKE_START, 241 255 &wake, sizeof(wake)); 242 256 if (ret) { 243 257 dev_err(dev, "Failed to read wake regs\n"); 244 258 return ret; 245 259 } 246 260 247 - ret = regmap_bulk_read(bd70528->regmap, BD70528_REG_RTC_ALM_START, 261 + ret = regmap_bulk_read(parent->regmap, BD70528_REG_RTC_ALM_START, 248 262 &alm, sizeof(alm)); 249 263 if (ret) { 250 264 dev_err(dev, "Failed to read alarm regs\n"); ··· 292 246 wake.ctrl &= ~BD70528_MASK_WAKE_EN; 293 247 } 294 248 295 - ret = regmap_bulk_write(bd70528->regmap, 249 + ret = regmap_bulk_write(parent->regmap, 296 250 BD70528_REG_RTC_WAKE_START, &wake, 297 251 sizeof(wake)); 298 252 if (ret) { 299 253 dev_err(dev, "Failed to set wake time\n"); 300 254 return ret; 301 255 } 302 - ret = regmap_bulk_write(bd70528->regmap, BD70528_REG_RTC_ALM_START, 256 + ret = regmap_bulk_write(parent->regmap, BD70528_REG_RTC_ALM_START, 303 257 &alm, sizeof(alm)); 304 258 if (ret) 305 259 dev_err(dev, "Failed to set alarm time\n"); ··· 307 261 return ret; 308 262 } 309 263 264 + static int bd71828_read_alarm(struct device *dev, struct rtc_wkalrm *a) 265 + { 266 + int ret; 267 + struct bd71828_rtc_alm alm; 268 + struct bd70528_rtc *r = dev_get_drvdata(dev); 269 + struct rohm_regmap_dev *parent = r->parent; 270 + 271 + ret = regmap_bulk_read(parent->regmap, BD71828_REG_RTC_ALM_START, 272 + &alm, sizeof(alm)); 273 + if (ret) { 274 + dev_err(dev, "Failed to read alarm regs\n"); 275 + return ret; 276 + } 277 + 278 + rtc2tm(&alm.alm0, &a->time); 279 + a->time.tm_mday = -1; 280 + a->time.tm_mon = -1; 281 + a->time.tm_year = -1; 282 + a->enabled = !!(alm.alm_mask & BD70528_MASK_ALM_EN); 283 + a->pending = 0; 284 + 285 + return 0; 286 + } 287 + 310 288 static int bd70528_read_alarm(struct device *dev, struct rtc_wkalrm *a) 311 289 { 312 290 struct bd70528_rtc_alm alm; 313 291 int ret; 314 292 struct bd70528_rtc *r = dev_get_drvdata(dev); 315 - struct rohm_regmap_dev *bd70528 = r->mfd; 293 + struct rohm_regmap_dev *parent = r->parent; 316 294 317 - ret = regmap_bulk_read(bd70528->regmap, BD70528_REG_RTC_ALM_START, 295 + ret = regmap_bulk_read(parent->regmap, BD70528_REG_RTC_ALM_START, 318 296 &alm, sizeof(alm)); 319 297 if (ret) { 320 298 dev_err(dev, "Failed to read alarm regs\n"); ··· 360 290 int ret, tmpret, old_states; 361 291 struct bd70528_rtc_data rtc_data; 362 292 struct bd70528_rtc *r = dev_get_drvdata(dev); 363 - struct rohm_regmap_dev *bd70528 = r->mfd; 293 + struct rohm_regmap_dev *parent = r->parent; 364 294 365 295 ret = bd70528_disable_rtc_based_timers(r, &old_states); 366 296 if (ret) 367 297 return ret; 368 298 369 - tmpret = regmap_bulk_read(bd70528->regmap, 370 - BD70528_REG_RTC_START, &rtc_data, 299 + tmpret = regmap_bulk_read(parent->regmap, 300 + r->reg_time_start, &rtc_data, 371 301 sizeof(rtc_data)); 372 302 if (tmpret) { 373 303 dev_err(dev, "Failed to read RTC time registers\n"); ··· 375 305 } 376 306 tm2rtc(t, &rtc_data); 377 307 378 - tmpret = regmap_bulk_write(bd70528->regmap, 379 - BD70528_REG_RTC_START, &rtc_data, 308 + tmpret = regmap_bulk_write(parent->regmap, 309 + r->reg_time_start, &rtc_data, 380 310 sizeof(rtc_data)); 381 311 if (tmpret) { 382 312 dev_err(dev, "Failed to set RTC time\n"); ··· 391 321 return ret; 392 322 } 393 323 324 + static int bd71828_set_time(struct device *dev, struct rtc_time *t) 325 + { 326 + return bd70528_set_time_locked(dev, t); 327 + } 328 + 394 329 static int bd70528_set_time(struct device *dev, struct rtc_time *t) 395 330 { 396 331 int ret; 397 332 struct bd70528_rtc *r = dev_get_drvdata(dev); 398 333 399 - bd70528_wdt_lock(r->mfd); 334 + bd70528_wdt_lock(r->parent); 400 335 ret = bd70528_set_time_locked(dev, t); 401 - bd70528_wdt_unlock(r->mfd); 336 + bd70528_wdt_unlock(r->parent); 402 337 return ret; 403 338 } 404 339 405 340 static int bd70528_get_time(struct device *dev, struct rtc_time *t) 406 341 { 407 342 struct bd70528_rtc *r = dev_get_drvdata(dev); 408 - struct rohm_regmap_dev *bd70528 = r->mfd; 343 + struct rohm_regmap_dev *parent = r->parent; 409 344 struct bd70528_rtc_data rtc_data; 410 345 int ret; 411 346 412 347 /* read the RTC date and time registers all at once */ 413 - ret = regmap_bulk_read(bd70528->regmap, 414 - BD70528_REG_RTC_START, &rtc_data, 348 + ret = regmap_bulk_read(parent->regmap, 349 + r->reg_time_start, &rtc_data, 415 350 sizeof(rtc_data)); 416 351 if (ret) { 417 352 dev_err(dev, "Failed to read RTC time (err %d)\n", ret); ··· 437 362 if (enabled) 438 363 enableval = 0; 439 364 440 - bd70528_wdt_lock(r->mfd); 441 - ret = bd70528_set_wake(r->mfd, enabled, NULL); 365 + bd70528_wdt_lock(r->parent); 366 + ret = bd70528_set_wake(r->parent, enabled, NULL); 442 367 if (ret) { 443 368 dev_err(dev, "Failed to change wake state\n"); 444 369 goto out_unlock; 445 370 } 446 - ret = regmap_update_bits(r->mfd->regmap, BD70528_REG_RTC_ALM_MASK, 371 + ret = regmap_update_bits(r->parent->regmap, BD70528_REG_RTC_ALM_MASK, 447 372 BD70528_MASK_ALM_EN, enableval); 448 373 if (ret) 449 374 dev_err(dev, "Failed to change alarm state\n"); 450 375 451 376 out_unlock: 452 - bd70528_wdt_unlock(r->mfd); 377 + bd70528_wdt_unlock(r->parent); 378 + return ret; 379 + } 380 + 381 + static int bd71828_alm_enable(struct device *dev, unsigned int enabled) 382 + { 383 + int ret; 384 + struct bd70528_rtc *r = dev_get_drvdata(dev); 385 + unsigned int enableval = BD70528_MASK_ALM_EN; 386 + 387 + if (!enabled) 388 + enableval = 0; 389 + 390 + ret = regmap_update_bits(r->parent->regmap, BD71828_REG_RTC_ALM0_MASK, 391 + BD70528_MASK_ALM_EN, enableval); 392 + if (ret) 393 + dev_err(dev, "Failed to change alarm state\n"); 394 + 453 395 return ret; 454 396 } 455 397 ··· 476 384 .read_alarm = bd70528_read_alarm, 477 385 .set_alarm = bd70528_set_alarm, 478 386 .alarm_irq_enable = bd70528_alm_enable, 387 + }; 388 + 389 + static const struct rtc_class_ops bd71828_rtc_ops = { 390 + .read_time = bd70528_get_time, 391 + .set_time = bd71828_set_time, 392 + .read_alarm = bd71828_read_alarm, 393 + .set_alarm = bd71828_set_alarm, 394 + .alarm_irq_enable = bd71828_alm_enable, 479 395 }; 480 396 481 397 static irqreturn_t alm_hndlr(int irq, void *data) ··· 497 397 static int bd70528_probe(struct platform_device *pdev) 498 398 { 499 399 struct bd70528_rtc *bd_rtc; 500 - struct rohm_regmap_dev *mfd; 400 + const struct rtc_class_ops *rtc_ops; 401 + struct rohm_regmap_dev *parent; 402 + const char *irq_name; 501 403 int ret; 502 404 struct rtc_device *rtc; 503 405 int irq; 504 406 unsigned int hr; 407 + bool enable_main_irq = false; 408 + u8 hour_reg; 409 + enum rohm_chip_type chip = platform_get_device_id(pdev)->driver_data; 505 410 506 - mfd = dev_get_drvdata(pdev->dev.parent); 507 - if (!mfd) { 411 + parent = dev_get_drvdata(pdev->dev.parent); 412 + if (!parent) { 508 413 dev_err(&pdev->dev, "No MFD driver data\n"); 509 414 return -EINVAL; 510 415 } ··· 517 412 if (!bd_rtc) 518 413 return -ENOMEM; 519 414 520 - bd_rtc->mfd = mfd; 415 + bd_rtc->parent = parent; 521 416 bd_rtc->dev = &pdev->dev; 522 417 523 - irq = platform_get_irq_byname(pdev, "bd70528-rtc-alm"); 524 - if (irq < 0) 418 + switch (chip) { 419 + case ROHM_CHIP_TYPE_BD70528: 420 + irq_name = "bd70528-rtc-alm"; 421 + bd_rtc->has_rtc_timers = true; 422 + bd_rtc->reg_time_start = BD70528_REG_RTC_START; 423 + hour_reg = BD70528_REG_RTC_HOUR; 424 + enable_main_irq = true; 425 + rtc_ops = &bd70528_rtc_ops; 426 + break; 427 + case ROHM_CHIP_TYPE_BD71828: 428 + irq_name = "bd71828-rtc-alm-0"; 429 + bd_rtc->reg_time_start = BD71828_REG_RTC_START; 430 + hour_reg = BD71828_REG_RTC_HOUR; 431 + rtc_ops = &bd71828_rtc_ops; 432 + break; 433 + default: 434 + dev_err(&pdev->dev, "Unknown chip\n"); 435 + return -ENOENT; 436 + } 437 + 438 + irq = platform_get_irq_byname(pdev, irq_name); 439 + 440 + if (irq < 0) { 441 + dev_err(&pdev->dev, "Failed to get irq\n"); 525 442 return irq; 443 + } 526 444 527 445 platform_set_drvdata(pdev, bd_rtc); 528 446 529 - ret = regmap_read(mfd->regmap, BD70528_REG_RTC_HOUR, &hr); 447 + ret = regmap_read(parent->regmap, hour_reg, &hr); 530 448 531 449 if (ret) { 532 450 dev_err(&pdev->dev, "Failed to reag RTC clock\n"); ··· 559 431 if (!(hr & BD70528_MASK_RTC_HOUR_24H)) { 560 432 struct rtc_time t; 561 433 562 - ret = bd70528_get_time(&pdev->dev, &t); 434 + ret = rtc_ops->read_time(&pdev->dev, &t); 563 435 564 436 if (!ret) 565 - ret = bd70528_set_time(&pdev->dev, &t); 437 + ret = rtc_ops->set_time(&pdev->dev, &t); 566 438 567 439 if (ret) { 568 440 dev_err(&pdev->dev, ··· 582 454 583 455 rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; 584 456 rtc->range_max = RTC_TIMESTAMP_END_2099; 585 - rtc->ops = &bd70528_rtc_ops; 457 + rtc->ops = rtc_ops; 586 458 587 459 /* Request alarm IRQ prior to registerig the RTC */ 588 460 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, &alm_hndlr, ··· 596 468 * leave them enabled as irq-controller should disable irqs 597 469 * from sub-registers when IRQ is disabled or freed. 598 470 */ 599 - ret = regmap_update_bits(mfd->regmap, 471 + if (enable_main_irq) { 472 + ret = regmap_update_bits(parent->regmap, 600 473 BD70528_REG_INT_MAIN_MASK, 601 474 BD70528_INT_RTC_MASK, 0); 602 - if (ret) { 603 - dev_err(&pdev->dev, "Failed to enable RTC interrupts\n"); 604 - return ret; 475 + if (ret) { 476 + dev_err(&pdev->dev, "Failed to enable RTC interrupts\n"); 477 + return ret; 478 + } 605 479 } 606 480 607 481 return rtc_register_device(rtc); 608 482 } 483 + 484 + static const struct platform_device_id bd718x7_rtc_id[] = { 485 + { "bd70528-rtc", ROHM_CHIP_TYPE_BD70528 }, 486 + { "bd71828-rtc", ROHM_CHIP_TYPE_BD71828 }, 487 + { }, 488 + }; 489 + MODULE_DEVICE_TABLE(platform, bd718x7_rtc_id); 609 490 610 491 static struct platform_driver bd70528_rtc = { 611 492 .driver = { 612 493 .name = "bd70528-rtc" 613 494 }, 614 495 .probe = bd70528_probe, 496 + .id_table = bd718x7_rtc_id, 615 497 }; 616 498 617 499 module_platform_driver(bd70528_rtc); 618 500 619 501 MODULE_AUTHOR("Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>"); 620 - MODULE_DESCRIPTION("BD70528 RTC driver"); 502 + MODULE_DESCRIPTION("ROHM BD70528 and BD71828 PMIC RTC driver"); 621 503 MODULE_LICENSE("GPL"); 622 504 MODULE_ALIAS("platform:bd70528-rtc");
+1 -12
include/linux/mfd/rohm-bd70528.h
··· 7 7 #include <linux/bits.h> 8 8 #include <linux/device.h> 9 9 #include <linux/mfd/rohm-generic.h> 10 + #include <linux/mfd/rohm-shared.h> 10 11 #include <linux/regmap.h> 11 12 12 13 enum { ··· 308 307 309 308 /* RTC masks to mask out reserved bits */ 310 309 311 - #define BD70528_MASK_RTC_SEC 0x7f 312 - #define BD70528_MASK_RTC_MINUTE 0x7f 313 - #define BD70528_MASK_RTC_HOUR_24H 0x80 314 - #define BD70528_MASK_RTC_HOUR_PM 0x20 315 - #define BD70528_MASK_RTC_HOUR 0x3f 316 - #define BD70528_MASK_RTC_DAY 0x3f 317 - #define BD70528_MASK_RTC_WEEK 0x07 318 - #define BD70528_MASK_RTC_MONTH 0x1f 319 - #define BD70528_MASK_RTC_YEAR 0xff 320 - #define BD70528_MASK_RTC_COUNT_L 0x7f 321 - 322 310 #define BD70528_MASK_ELAPSED_TIMER_EN 0x1 323 311 /* Mask second, min and hour fields 324 312 * HW would support ALM irq for over 24h ··· 316 326 * wake-up we limit ALM to 24H and only 317 327 * unmask sec, min and hour 318 328 */ 319 - #define BD70528_MASK_ALM_EN 0x7 320 329 #define BD70528_MASK_WAKE_EN 0x1 321 330 322 331 /* WDT masks */
+3 -1
include/linux/mfd/rohm-bd71828.h
··· 5 5 #define __LINUX_MFD_BD71828_H__ 6 6 7 7 #include <linux/mfd/rohm-generic.h> 8 + #include <linux/mfd/rohm-shared.h> 8 9 9 10 /* Regulator IDs */ 10 11 enum { ··· 161 160 #define BD71828_REG_RTC_YEAR 0x52 162 161 163 162 #define BD71828_REG_RTC_ALM0_SEC 0x53 163 + #define BD71828_REG_RTC_ALM_START BD71828_REG_RTC_ALM0_SEC 164 164 #define BD71828_REG_RTC_ALM0_MINUTE 0x54 165 165 #define BD71828_REG_RTC_ALM0_HOUR 0x55 166 166 #define BD71828_REG_RTC_ALM0_WEEK 0x56 ··· 180 178 #define BD71828_REG_RTC_ALM1_MASK 0x62 181 179 182 180 #define BD71828_REG_RTC_ALM2 0x63 181 + #define BD71828_REG_RTC_START BD71828_REG_RTC_SEC 183 182 184 183 /* Charger/Battey */ 185 184 #define BD71828_REG_CHG_STATE 0x65 ··· 206 203 #define BD71828_REG_INT_MASK_BAT_MON4 0xdc 207 204 #define BD71828_REG_INT_MASK_TEMP 0xdd 208 205 #define BD71828_REG_INT_MASK_RTC 0xde 209 - 210 206 211 207 #define BD71828_REG_INT_MAIN 0xdf 212 208 #define BD71828_REG_INT_BUCK 0xe0
+21
include/linux/mfd/rohm-shared.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 + /* Copyright (C) 2020 ROHM Semiconductors */ 3 + 4 + 5 + #ifndef __LINUX_MFD_ROHM_SHARED_H__ 6 + #define __LINUX_MFD_ROHM_SHARED_H__ 7 + 8 + /* RTC definitions shared between BD70528 and BD71828 */ 9 + 10 + #define BD70528_MASK_RTC_SEC 0x7f 11 + #define BD70528_MASK_RTC_MINUTE 0x7f 12 + #define BD70528_MASK_RTC_HOUR_24H 0x80 13 + #define BD70528_MASK_RTC_HOUR_PM 0x20 14 + #define BD70528_MASK_RTC_HOUR 0x3f 15 + #define BD70528_MASK_RTC_DAY 0x3f 16 + #define BD70528_MASK_RTC_WEEK 0x07 17 + #define BD70528_MASK_RTC_MONTH 0x1f 18 + #define BD70528_MASK_RTC_YEAR 0xff 19 + #define BD70528_MASK_ALM_EN 0x7 20 + 21 + #endif /* __LINUX_MFD_ROHM_SHARED_H__ */