|
@@ -617,6 +617,20 @@ static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 func)
|
|
return (func & i2c_get_functionality(adap)) == func;
|
|
return (func & i2c_get_functionality(adap)) == func;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * i2c_check_quirks() - Function for checking the quirk flags in an i2c adapter
|
|
|
|
+ * @adap: i2c adapter
|
|
|
|
+ * @quirks: quirk flags
|
|
|
|
+ *
|
|
|
|
+ * Return: true if the adapter has all the specified quirk flags, false if not
|
|
|
|
+ */
|
|
|
|
+static inline bool i2c_check_quirks(struct i2c_adapter *adap, u64 quirks)
|
|
|
|
+{
|
|
|
|
+ if (!adap->quirks)
|
|
|
|
+ return false;
|
|
|
|
+ return (adap->quirks->flags & quirks) == quirks;
|
|
|
|
+}
|
|
|
|
+
|
|
/* Return the adapter number for a specific adapter */
|
|
/* Return the adapter number for a specific adapter */
|
|
static inline int i2c_adapter_id(struct i2c_adapter *adap)
|
|
static inline int i2c_adapter_id(struct i2c_adapter *adap)
|
|
{
|
|
{
|