aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/db8500-prcmu.h
diff options
context:
space:
mode:
authorMattias Nilsson <mattias.i.nilsson@stericsson.com>2012-01-13 10:20:20 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-03-06 12:46:32 -0500
commit0508901ca794d411efb09befb88b8194d8387428 (patch)
tree44539901a5db5a28955cf62c03860d073fa8a82d /include/linux/mfd/db8500-prcmu.h
parentb58d12fe6ccd16030e1a69b5c443075f7bed0f6d (diff)
mfd: Update abstract dbx500 interface
This prefixes a number of accessor functions with db8500_* since they are DB8500-specific and we need to move to this naming scheme. We also replace numerous instances of machine_is() with cpu_is() which covers the right type of ASICs rather than entire machines i.e. boards. Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/db8500-prcmu.h')
-rw-r--r--include/linux/mfd/db8500-prcmu.h61
1 files changed, 30 insertions, 31 deletions
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index 18959171f446..c5028f1246fc 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -512,13 +512,9 @@ int prcmu_set_rc_a2p(enum romcode_write);
512enum romcode_read prcmu_get_rc_p2a(void); 512enum romcode_read prcmu_get_rc_p2a(void);
513enum ap_pwrst prcmu_get_xp70_current_state(void); 513enum ap_pwrst prcmu_get_xp70_current_state(void);
514bool prcmu_has_arm_maxopp(void); 514bool prcmu_has_arm_maxopp(void);
515int prcmu_set_ape_opp(u8 opp);
516int prcmu_get_ape_opp(void);
517struct prcmu_fw_version *prcmu_get_fw_version(void); 515struct prcmu_fw_version *prcmu_get_fw_version(void);
518int prcmu_request_ape_opp_100_voltage(bool enable); 516int prcmu_request_ape_opp_100_voltage(bool enable);
519int prcmu_release_usb_wakeup_state(void); 517int prcmu_release_usb_wakeup_state(void);
520int prcmu_set_ddr_opp(u8 opp);
521int prcmu_get_ddr_opp(void);
522/* NOTE! Use regulator framework instead */ 518/* NOTE! Use regulator framework instead */
523int prcmu_set_hwacc(u16 hw_acc_dev, u8 state); 519int prcmu_set_hwacc(u16 hw_acc_dev, u8 state);
524void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep, 520void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep,
@@ -527,24 +523,24 @@ bool prcmu_is_auto_pm_enabled(void);
527 523
528int prcmu_config_clkout(u8 clkout, u8 source, u8 div); 524int prcmu_config_clkout(u8 clkout, u8 source, u8 div);
529int prcmu_set_clock_divider(u8 clock, u8 divider); 525int prcmu_set_clock_divider(u8 clock, u8 divider);
530int prcmu_config_hotdog(u8 threshold); 526int db8500_prcmu_config_hotdog(u8 threshold);
531int prcmu_config_hotmon(u8 low, u8 high); 527int db8500_prcmu_config_hotmon(u8 low, u8 high);
532int prcmu_start_temp_sense(u16 cycles32k); 528int db8500_prcmu_start_temp_sense(u16 cycles32k);
533int prcmu_stop_temp_sense(void); 529int db8500_prcmu_stop_temp_sense(void);
534int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); 530int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
535int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size); 531int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
536 532
537void prcmu_ac_wake_req(void); 533void prcmu_ac_wake_req(void);
538void prcmu_ac_sleep_req(void); 534void prcmu_ac_sleep_req(void);
539void prcmu_modem_reset(void); 535void db8500_prcmu_modem_reset(void);
540void prcmu_enable_spi2(void); 536void prcmu_enable_spi2(void);
541void prcmu_disable_spi2(void); 537void prcmu_disable_spi2(void);
542 538
543int prcmu_config_a9wdog(u8 num, bool sleep_auto_off); 539int db8500_prcmu_config_a9wdog(u8 num, bool sleep_auto_off);
544int prcmu_enable_a9wdog(u8 id); 540int db8500_prcmu_enable_a9wdog(u8 id);
545int prcmu_disable_a9wdog(u8 id); 541int db8500_prcmu_disable_a9wdog(u8 id);
546int prcmu_kick_a9wdog(u8 id); 542int db8500_prcmu_kick_a9wdog(u8 id);
547int prcmu_load_a9wdog(u8 id, u32 val); 543int db8500_prcmu_load_a9wdog(u8 id, u32 val);
548 544
549void db8500_prcmu_system_reset(u16 reset_code); 545void db8500_prcmu_system_reset(u16 reset_code);
550int db8500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, bool keep_ap_pll); 546int db8500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, bool keep_ap_pll);
@@ -561,6 +557,10 @@ u16 db8500_prcmu_get_reset_code(void);
561bool db8500_prcmu_is_ac_wake_requested(void); 557bool db8500_prcmu_is_ac_wake_requested(void);
562int db8500_prcmu_set_arm_opp(u8 opp); 558int db8500_prcmu_set_arm_opp(u8 opp);
563int db8500_prcmu_get_arm_opp(void); 559int db8500_prcmu_get_arm_opp(void);
560int db8500_prcmu_set_ape_opp(u8 opp);
561int db8500_prcmu_get_ape_opp(void);
562int db8500_prcmu_set_ddr_opp(u8 opp);
563int db8500_prcmu_get_ddr_opp(void);
564 564
565#else /* !CONFIG_MFD_DB8500_PRCMU */ 565#else /* !CONFIG_MFD_DB8500_PRCMU */
566 566
@@ -591,12 +591,12 @@ static inline struct prcmu_fw_version *prcmu_get_fw_version(void)
591 return NULL; 591 return NULL;
592} 592}
593 593
594static inline int prcmu_set_ape_opp(u8 opp) 594static inline int db8500_prcmu_set_ape_opp(u8 opp)
595{ 595{
596 return 0; 596 return 0;
597} 597}
598 598
599static inline int prcmu_get_ape_opp(void) 599static inline int db8500_prcmu_get_ape_opp(void)
600{ 600{
601 return APE_100_OPP; 601 return APE_100_OPP;
602} 602}
@@ -611,12 +611,12 @@ static inline int prcmu_release_usb_wakeup_state(void)
611 return 0; 611 return 0;
612} 612}
613 613
614static inline int prcmu_set_ddr_opp(u8 opp) 614static inline int db8500_prcmu_set_ddr_opp(u8 opp)
615{ 615{
616 return 0; 616 return 0;
617} 617}
618 618
619static inline int prcmu_get_ddr_opp(void) 619static inline int db8500_prcmu_get_ddr_opp(void)
620{ 620{
621 return DDR_100_OPP; 621 return DDR_100_OPP;
622} 622}
@@ -625,7 +625,6 @@ static inline int prcmu_set_hwacc(u16 hw_acc_dev, u8 state)
625{ 625{
626 return 0; 626 return 0;
627} 627}
628
629static inline void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep, 628static inline void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep,
630 struct prcmu_auto_pm_config *idle) 629 struct prcmu_auto_pm_config *idle)
631{ 630{
@@ -646,22 +645,22 @@ static inline int prcmu_set_clock_divider(u8 clock, u8 divider)
646 return 0; 645 return 0;
647} 646}
648 647
649static inline int prcmu_config_hotdog(u8 threshold) 648static inline int db8500_prcmu_config_hotdog(u8 threshold)
650{ 649{
651 return 0; 650 return 0;
652} 651}
653 652
654static inline int prcmu_config_hotmon(u8 low, u8 high) 653static inline int db8500_prcmu_config_hotmon(u8 low, u8 high)
655{ 654{
656 return 0; 655 return 0;
657} 656}
658 657
659static inline int prcmu_start_temp_sense(u16 cycles32k) 658static inline int db8500_prcmu_start_temp_sense(u16 cycles32k)
660{ 659{
661 return 0; 660 return 0;
662} 661}
663 662
664static inline int prcmu_stop_temp_sense(void) 663static inline int db8500_prcmu_stop_temp_sense(void)
665{ 664{
666 return 0; 665 return 0;
667} 666}
@@ -680,7 +679,9 @@ static inline void prcmu_ac_wake_req(void) {}
680 679
681static inline void prcmu_ac_sleep_req(void) {} 680static inline void prcmu_ac_sleep_req(void) {}
682 681
683static inline void prcmu_modem_reset(void) {} 682static inline void db8500_prcmu_modem_reset(void) {}
683
684static inline void db8500_prcmu_system_reset(u16 reset_code) {}
684 685
685static inline int prcmu_enable_spi2(void) 686static inline int prcmu_enable_spi2(void)
686{ 687{
@@ -692,8 +693,6 @@ static inline int prcmu_disable_spi2(void)
692 return 0; 693 return 0;
693} 694}
694 695
695static inline void db8500_prcmu_system_reset(u16 reset_code) {}
696
697static inline int db8500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, 696static inline int db8500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
698 bool keep_ap_pll) 697 bool keep_ap_pll)
699{ 698{
@@ -741,27 +740,27 @@ static inline u16 db8500_prcmu_get_reset_code(void)
741 return 0; 740 return 0;
742} 741}
743 742
744static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off) 743static inline int db8500_prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
745{ 744{
746 return 0; 745 return 0;
747} 746}
748 747
749static inline int prcmu_enable_a9wdog(u8 id) 748static inline int db8500_prcmu_enable_a9wdog(u8 id)
750{ 749{
751 return 0; 750 return 0;
752} 751}
753 752
754static inline int prcmu_disable_a9wdog(u8 id) 753static inline int db8500_prcmu_disable_a9wdog(u8 id)
755{ 754{
756 return 0; 755 return 0;
757} 756}
758 757
759static inline int prcmu_kick_a9wdog(u8 id) 758static inline int db8500_prcmu_kick_a9wdog(u8 id)
760{ 759{
761 return 0; 760 return 0;
762} 761}
763 762
764static inline int prcmu_load_a9wdog(u8 id, u32 val) 763static inline int db8500_prcmu_load_a9wdog(u8 id, u32 val)
765{ 764{
766 return 0; 765 return 0;
767} 766}