xref: /openbmc/linux/arch/arm/mach-s3c/iic-core.h (revision c6ff132d)
1c6ff132dSArnd Bergmann /* SPDX-License-Identifier: GPL-2.0 */
2c6ff132dSArnd Bergmann /*
3c6ff132dSArnd Bergmann  * Copyright 2008 Openmoko, Inc.
4c6ff132dSArnd Bergmann  * Copyright 2008 Simtec Electronics
5c6ff132dSArnd Bergmann  *	Ben Dooks <ben@simtec.co.uk>
6c6ff132dSArnd Bergmann  *
7c6ff132dSArnd Bergmann  * S3C - I2C Controller core functions
8c6ff132dSArnd Bergmann  */
9c6ff132dSArnd Bergmann 
10c6ff132dSArnd Bergmann #ifndef __ASM_ARCH_IIC_CORE_H
11c6ff132dSArnd Bergmann #define __ASM_ARCH_IIC_CORE_H __FILE__
12c6ff132dSArnd Bergmann 
13c6ff132dSArnd Bergmann /* These functions are only for use with the core support code, such as
14c6ff132dSArnd Bergmann  * the cpu specific initialisation code
15c6ff132dSArnd Bergmann  */
16c6ff132dSArnd Bergmann 
17c6ff132dSArnd Bergmann /* re-define device name depending on support. */
18c6ff132dSArnd Bergmann static inline void s3c_i2c0_setname(char *name)
19c6ff132dSArnd Bergmann {
20c6ff132dSArnd Bergmann 	/* currently this device is always compiled in */
21c6ff132dSArnd Bergmann 	s3c_device_i2c0.name = name;
22c6ff132dSArnd Bergmann }
23c6ff132dSArnd Bergmann 
24c6ff132dSArnd Bergmann static inline void s3c_i2c1_setname(char *name)
25c6ff132dSArnd Bergmann {
26c6ff132dSArnd Bergmann #ifdef CONFIG_S3C_DEV_I2C1
27c6ff132dSArnd Bergmann 	s3c_device_i2c1.name = name;
28c6ff132dSArnd Bergmann #endif
29c6ff132dSArnd Bergmann }
30c6ff132dSArnd Bergmann 
31c6ff132dSArnd Bergmann static inline void s3c_i2c2_setname(char *name)
32c6ff132dSArnd Bergmann {
33c6ff132dSArnd Bergmann #ifdef CONFIG_S3C_DEV_I2C2
34c6ff132dSArnd Bergmann 	s3c_device_i2c2.name = name;
35c6ff132dSArnd Bergmann #endif
36c6ff132dSArnd Bergmann }
37c6ff132dSArnd Bergmann 
38c6ff132dSArnd Bergmann #endif /* __ASM_ARCH_IIC_H */
39