Lines Matching +full:ab8500 +full:- +full:sysctrl
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) ST-Ericsson SA 2010
20 * non-supported multi-byte I2C access via PRCMU. Set to 0x00 to ease the
31 /* AB8500 CIDs*/
41 * AB8500 bank addresses
71 * drivers/mdf/ab8500-core.c
73 /* Definitions for AB8500, AB9540 and AB8540 */
74 /* ab8500_irq_regoffset[0] -> IT[Source|Latch|Mask]1 */
83 /* ab8500_irq_regoffset[1] -> IT[Source|Latch|Mask]2 */
89 /* ab8500_irq_regoffset[2] -> IT[Source|Latch|Mask]3 */
98 /* ab8500_irq_regoffset[3] -> IT[Source|Latch|Mask]4 */
107 /* ab8500_irq_regoffset[4] -> IT[Source|Latch|Mask]5 */
116 /* ab8500_irq_regoffset[5] -> IT[Source|Latch|Mask]7 */
125 /* ab8500_irq_regoffset[6] -> IT[Source|Latch|Mask]8 */
134 /* ab8500_irq_regoffset[7] -> IT[Source|Latch|Mask]9 */
143 /* ab8500_irq_regoffset[8] -> IT[Source|Latch|Mask]10 */
152 /* ab8500_irq_regoffset[9] -> IT[Source|Latch|Mask]12 */
160 /* ab8500_irq_regoffset[10] -> IT[Source|Latch|Mask]19 */
165 /* ab8500_irq_regoffset[11] -> IT[Source|Latch|Mask]20 */
174 /* ab8500_irq_regoffset[12] -> IT[Source|Latch|Mask]21 */
183 /* ab8500_irq_regoffset[13] -> IT[Source|Latch|Mask]22 */
193 /* ab8500_irq_regoffset[14] -> IT[Source|Latch|Mask]13 */
200 /* ab8500_irq_regoffset[15] -> IT[Source|Latch|Mask]14 */
207 /* ab8500_irq_regoffset[16] -> IT[Source|Latch|Mask]25 */
215 /* ab8500_irq_regoffset[17] -> IT[Source|Latch|Mask]6 */
222 /* ab8500_irq_regoffset[18] -> IT[Source|Latch|Mask]23 */
231 /* ab8500_irq_regoffset[19] -> IT[Source|Latch|Mask]24 */
233 /* ab8540_irq_regoffset[20] -> IT[Source|Latch|Mask]26 */
242 /* ab8540_irq_regoffset[21] -> IT[Source|Latch|Mask]27 */
251 /* ab8540_irq_regoffset[22] -> IT[Source|Latch|Mask]28 */
260 /* ab8540_irq_regoffset[23] -> IT[Source|Latch|Mask]29 */
269 /* ab8540_irq_regoffset[24] -> IT[Source|Latch|Mask]30 */
278 /* ab8540_irq_regoffset[25] -> IT[Source|Latch|Mask]31 */
287 /* ab8540_irq_regoffset[26] -> IT[Source|Latch|Mask]32 */
296 /* ab8540_irq_regoffset[27] -> IT[Source|Latch|Mask]33 */
303 * Of the currently supported AB devices, AB8500 and AB9540, it is the AB9540
310 /* This is set to the roof of any AB8500 chip variant IRQ counts */
327 * struct ab8500 - ab8500 internal structure
334 * @version: chip version id (e.g. ab8500 or ab9540)
347 struct ab8500 { struct
357 int (*write)(struct ab8500 *ab8500, u16 addr, u8 data); argument
358 int (*write_masked)(struct ab8500 *ab8500, u16 addr, u8 mask, u8 data); argument
359 int (*read)(struct ab8500 *ab8500, u16 addr); argument
375 * struct ab8500_platform_data - AB8500 platform data
376 * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used
377 * @init: board-specific initialization after detection of ab8500 argument
380 void (*init) (struct ab8500 *);
382 struct ab8500_sysctrl_platform_data *sysctrl; member
385 extern int ab8500_suspend(struct ab8500 *ab8500);
387 static inline int is_ab8500(struct ab8500 *ab) in is_ab8500()
389 return ab->version == AB8500_VERSION_AB8500; in is_ab8500()
392 static inline int is_ab8505(struct ab8500 *ab) in is_ab8505()
394 return ab->version == AB8500_VERSION_AB8505; in is_ab8505()
397 static inline int is_ab9540(struct ab8500 *ab) in is_ab9540()
399 return ab->version == AB8500_VERSION_AB9540; in is_ab9540()
402 static inline int is_ab8540(struct ab8500 *ab) in is_ab8540()
404 return ab->version == AB8500_VERSION_AB8540; in is_ab8540()
408 static inline int is_ab8500_1p0_or_earlier(struct ab8500 *ab) in is_ab8500_1p0_or_earlier()
410 return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT1P0)); in is_ab8500_1p0_or_earlier()
414 static inline int is_ab8500_1p1_or_earlier(struct ab8500 *ab) in is_ab8500_1p1_or_earlier()
416 return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT1P1)); in is_ab8500_1p1_or_earlier()
420 static inline int is_ab8500_2p0_or_earlier(struct ab8500 *ab) in is_ab8500_2p0_or_earlier()
422 return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT2P0)); in is_ab8500_2p0_or_earlier()
425 static inline int is_ab8500_3p3_or_earlier(struct ab8500 *ab) in is_ab8500_3p3_or_earlier()
427 return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT3P3)); in is_ab8500_3p3_or_earlier()
431 static inline int is_ab8500_2p0(struct ab8500 *ab) in is_ab8500_2p0()
433 return (is_ab8500(ab) && (ab->chip_id == AB8500_CUT2P0)); in is_ab8500_2p0()
436 static inline int is_ab8505_1p0_or_earlier(struct ab8500 *ab) in is_ab8505_1p0_or_earlier()
438 return (is_ab8505(ab) && (ab->chip_id <= AB8500_CUT1P0)); in is_ab8505_1p0_or_earlier()
441 static inline int is_ab8505_2p0(struct ab8500 *ab) in is_ab8505_2p0()
443 return (is_ab8505(ab) && (ab->chip_id == AB8500_CUT2P0)); in is_ab8505_2p0()
446 static inline int is_ab9540_1p0_or_earlier(struct ab8500 *ab) in is_ab9540_1p0_or_earlier()
448 return (is_ab9540(ab) && (ab->chip_id <= AB8500_CUT1P0)); in is_ab9540_1p0_or_earlier()
451 static inline int is_ab9540_2p0(struct ab8500 *ab) in is_ab9540_2p0()
453 return (is_ab9540(ab) && (ab->chip_id == AB8500_CUT2P0)); in is_ab9540_2p0()
460 static inline int is_ab9540_3p0(struct ab8500 *ab) in is_ab9540_3p0()
462 return (is_ab9540(ab) && (ab->chip_id == AB8500_CUT3P0)); in is_ab9540_3p0()
465 static inline int is_ab8540_1p0_or_earlier(struct ab8500 *ab) in is_ab8540_1p0_or_earlier()
467 return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P0); in is_ab8540_1p0_or_earlier()
470 static inline int is_ab8540_1p1_or_earlier(struct ab8500 *ab) in is_ab8540_1p1_or_earlier()
472 return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P1); in is_ab8540_1p1_or_earlier()
475 static inline int is_ab8540_1p2_or_earlier(struct ab8500 *ab) in is_ab8540_1p2_or_earlier()
477 return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P2); in is_ab8540_1p2_or_earlier()
480 static inline int is_ab8540_2p0_or_earlier(struct ab8500 *ab) in is_ab8540_2p0_or_earlier()
482 return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT2P0); in is_ab8540_2p0_or_earlier()
485 static inline int is_ab8540_2p0(struct ab8500 *ab) in is_ab8540_2p0()
487 return is_ab8540(ab) && (ab->chip_id == AB8500_CUT2P0); in is_ab8540_2p0()
490 static inline int is_ab8505_2p0_earlier(struct ab8500 *ab) in is_ab8505_2p0_earlier()
492 return (is_ab8505(ab) && (ab->chip_id < AB8500_CUT2P0)); in is_ab8505_2p0_earlier()
495 static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab) in is_ab9540_2p0_or_earlier()
497 return (is_ab9540(ab) && (ab->chip_id < AB8500_CUT2P0)); in is_ab9540_2p0_or_earlier()