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