~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/mcp.h

Version: ~ [ linux-5.3-rc5 ] ~ [ linux-5.2.9 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.67 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.139 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.189 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.189 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.72 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  linux/drivers/mfd/mcp.h
  3  *
  4  *  Copyright (C) 2001 Russell King, All Rights Reserved.
  5  *
  6  * This program is free software; you can redistribute it and/or modify
  7  * it under the terms of the GNU General Public License as published by
  8  * the Free Software Foundation; either version 2 of the License.
  9  */
 10 #ifndef MCP_H
 11 #define MCP_H
 12 
 13 struct mcp_ops;
 14 
 15 struct mcp {
 16         struct module   *owner;
 17         struct mcp_ops  *ops;
 18         spinlock_t      lock;
 19         int             use_count;
 20         unsigned int    sclk_rate;
 21         unsigned int    rw_timeout;
 22         struct device   attached_device;
 23 };
 24 
 25 struct mcp_ops {
 26         void            (*set_telecom_divisor)(struct mcp *, unsigned int);
 27         void            (*set_audio_divisor)(struct mcp *, unsigned int);
 28         void            (*reg_write)(struct mcp *, unsigned int, unsigned int);
 29         unsigned int    (*reg_read)(struct mcp *, unsigned int);
 30         void            (*enable)(struct mcp *);
 31         void            (*disable)(struct mcp *);
 32 };
 33 
 34 void mcp_set_telecom_divisor(struct mcp *, unsigned int);
 35 void mcp_set_audio_divisor(struct mcp *, unsigned int);
 36 void mcp_reg_write(struct mcp *, unsigned int, unsigned int);
 37 unsigned int mcp_reg_read(struct mcp *, unsigned int);
 38 void mcp_enable(struct mcp *);
 39 void mcp_disable(struct mcp *);
 40 #define mcp_get_sclk_rate(mcp)  ((mcp)->sclk_rate)
 41 
 42 struct mcp *mcp_host_alloc(struct device *, size_t);
 43 int mcp_host_add(struct mcp *, void *);
 44 void mcp_host_del(struct mcp *);
 45 void mcp_host_free(struct mcp *);
 46 
 47 struct mcp_driver {
 48         struct device_driver drv;
 49         int (*probe)(struct mcp *);
 50         void (*remove)(struct mcp *);
 51 };
 52 
 53 int mcp_driver_register(struct mcp_driver *);
 54 void mcp_driver_unregister(struct mcp_driver *);
 55 
 56 #define mcp_get_drvdata(mcp)    dev_get_drvdata(&(mcp)->attached_device)
 57 #define mcp_set_drvdata(mcp,d)  dev_set_drvdata(&(mcp)->attached_device, d)
 58 
 59 static inline void *mcp_priv(struct mcp *mcp)
 60 {
 61         return mcp + 1;
 62 }
 63 
 64 #endif
 65 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp