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

TOMOYO Linux Cross Reference
Linux/sound/soc/codecs/lpass-macro-common.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright (c) 2022, The Linux Foundation. All rights reserved.
  4  */
  5 
  6 #ifndef __LPASS_MACRO_COMMON_H__
  7 #define __LPASS_MACRO_COMMON_H__
  8 
  9 /* NPL clock is expected */
 10 #define LPASS_MACRO_FLAG_HAS_NPL_CLOCK          BIT(0)
 11 /* The soundwire block should be internally reset at probe */
 12 #define LPASS_MACRO_FLAG_RESET_SWR              BIT(1)
 13 
 14 enum lpass_version {
 15         LPASS_VER_9_0_0,
 16         LPASS_VER_9_2_0,
 17         LPASS_VER_10_0_0,
 18         LPASS_VER_11_0_0,
 19 };
 20 
 21 enum lpass_codec_version {
 22         LPASS_CODEC_VERSION_UNKNOWN,
 23         LPASS_CODEC_VERSION_1_0,
 24         LPASS_CODEC_VERSION_1_1,
 25         LPASS_CODEC_VERSION_1_2,
 26         LPASS_CODEC_VERSION_2_0,
 27         LPASS_CODEC_VERSION_2_1,
 28         LPASS_CODEC_VERSION_2_5,
 29         LPASS_CODEC_VERSION_2_6,
 30         LPASS_CODEC_VERSION_2_7,
 31         LPASS_CODEC_VERSION_2_8,
 32 };
 33 
 34 struct lpass_macro {
 35         struct device *macro_pd;
 36         struct device *dcodec_pd;
 37 };
 38 
 39 struct lpass_macro *lpass_macro_pds_init(struct device *dev);
 40 void lpass_macro_pds_exit(struct lpass_macro *pds);
 41 void lpass_macro_set_codec_version(enum lpass_codec_version version);
 42 enum lpass_codec_version lpass_macro_get_codec_version(void);
 43 
 44 static inline void lpass_macro_pds_exit_action(void *pds)
 45 {
 46         lpass_macro_pds_exit(pds);
 47 }
 48 
 49 static inline const char *lpass_macro_get_codec_version_string(int version)
 50 {
 51         switch (version) {
 52         case LPASS_CODEC_VERSION_1_0:
 53                 return "v1.0";
 54         case LPASS_CODEC_VERSION_1_1:
 55                 return "v1.1";
 56         case LPASS_CODEC_VERSION_1_2:
 57                 return "v1.2";
 58         case LPASS_CODEC_VERSION_2_0:
 59                 return "v2.0";
 60         case LPASS_CODEC_VERSION_2_1:
 61                 return "v2.1";
 62         case LPASS_CODEC_VERSION_2_5:
 63                 return "v2.5";
 64         case LPASS_CODEC_VERSION_2_6:
 65                 return "v2.6";
 66         case LPASS_CODEC_VERSION_2_7:
 67                 return "v2.7";
 68         case LPASS_CODEC_VERSION_2_8:
 69                 return "v2.8";
 70         default:
 71                 break;
 72         }
 73         return "NA";
 74 }
 75 
 76 #endif /* __LPASS_MACRO_COMMON_H__ */
 77 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php