File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
Documentation/devicetree/bindings/i2c Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ title: Freescale MXS Inter IC (I2C) Controller
99maintainers :
1010 - Shawn Guo <shawnguo@kernel.org>
1111
12+ allOf :
13+ - $ref : /schemas/i2c/i2c-controller.yaml#
14+
1215properties :
1316 compatible :
1417 enum :
@@ -37,7 +40,7 @@ required:
3740 - dmas
3841 - dma-names
3942
40- additionalProperties : false
43+ unevaluatedProperties : false
4144
4245examples :
4346 - |
Original file line number Diff line number Diff line change @@ -694,6 +694,7 @@ static void npcm_i2c_callback(struct npcm_i2c *bus,
694694{
695695 struct i2c_msg * msgs ;
696696 int msgs_num ;
697+ bool do_complete = false;
697698
698699 msgs = bus -> msgs ;
699700 msgs_num = bus -> msgs_num ;
@@ -722,23 +723,17 @@ static void npcm_i2c_callback(struct npcm_i2c *bus,
722723 msgs [1 ].flags & I2C_M_RD )
723724 msgs [1 ].len = info ;
724725 }
725- if (completion_done (& bus -> cmd_complete ) == false)
726- complete (& bus -> cmd_complete );
727- break ;
728-
726+ do_complete = true;
727+ break ;
729728 case I2C_NACK_IND :
730729 /* MASTER transmit got a NACK before tx all bytes */
731730 bus -> cmd_err = - ENXIO ;
732- if (bus -> master_or_slave == I2C_MASTER )
733- complete (& bus -> cmd_complete );
734-
731+ do_complete = true;
735732 break ;
736733 case I2C_BUS_ERR_IND :
737734 /* Bus error */
738735 bus -> cmd_err = - EAGAIN ;
739- if (bus -> master_or_slave == I2C_MASTER )
740- complete (& bus -> cmd_complete );
741-
736+ do_complete = true;
742737 break ;
743738 case I2C_WAKE_UP_IND :
744739 /* I2C wake up */
@@ -752,6 +747,8 @@ static void npcm_i2c_callback(struct npcm_i2c *bus,
752747 if (bus -> slave )
753748 bus -> master_or_slave = I2C_SLAVE ;
754749#endif
750+ if (do_complete )
751+ complete (& bus -> cmd_complete );
755752}
756753
757754static u8 npcm_i2c_fifo_usage (struct npcm_i2c * bus )
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
341341 priv -> adap .lock_ops = & i2c_parent_lock_ops ;
342342
343343 /* Sanity check on class */
344- if (i2c_mux_parent_classes (parent ) & class )
344+ if (i2c_mux_parent_classes (parent ) & class & ~ I2C_CLASS_DEPRECATED )
345345 dev_err (& parent -> dev ,
346346 "Segment %d behind mux can't share classes with ancestors\n" ,
347347 chan_id );
You can’t perform that action at this time.
0 commit comments