Commit 262f72b
rtc: isl1208: Add isl1208_set_xtoscb()
As per the HW manual, set the XTOSCB bit as follows:
If using an external clock signal, set the XTOSCB bit as 1 to
disable the crystal oscillator.
If using an external crystal, the XTOSCB bit needs to be set at 0
to enable the crystal oscillator.
Add isl1208_set_xtoscb() to set XTOSCB bit based on the clock-names
property. Fallback is enabling the internal crystal oscillator.
While at it, introduce a variable "sr" for reading the status register
in probe() as it is reused for writing and also remove the unnecessary
blank line.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230623140948.384762-10-biju.das.jz@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>1 parent 5923fc7 commit 262f72b
1 file changed
Lines changed: 51 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
178 | 193 | | |
179 | 194 | | |
180 | 195 | | |
| |||
511 | 526 | | |
512 | 527 | | |
513 | 528 | | |
514 | | - | |
515 | 529 | | |
516 | 530 | | |
517 | 531 | | |
| |||
805 | 819 | | |
806 | 820 | | |
807 | 821 | | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
808 | 834 | | |
809 | 835 | | |
810 | 836 | | |
811 | | - | |
812 | 837 | | |
813 | 838 | | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
814 | 842 | | |
815 | 843 | | |
816 | 844 | | |
| |||
837 | 865 | | |
838 | 866 | | |
839 | 867 | | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
840 | 881 | | |
841 | 882 | | |
842 | 883 | | |
| |||
848 | 889 | | |
849 | 890 | | |
850 | 891 | | |
851 | | - | |
852 | | - | |
| 892 | + | |
| 893 | + | |
853 | 894 | | |
854 | | - | |
| 895 | + | |
855 | 896 | | |
856 | 897 | | |
857 | | - | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
858 | 903 | | |
859 | 904 | | |
860 | 905 | | |
| |||
0 commit comments