xiaoxiang781216 commented on code in PR #19937:
URL: https://github.com/apache/nuttx/pull/19937#discussion_r3838902416


##########
arch/x86/src/qemu/syslinux_entry.S:
##########
@@ -0,0 +1,37 @@
+.intel_syntax noprefix

Review Comment:
   why change x86 source



##########
drivers/ioexpander/ch422g.c:
##########
@@ -0,0 +1,753 @@
+/****************************************************************************
+ * drivers/ioexpander/ch422g.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/* The WCH CH422G is an I2C I/O expander offering eight bi-directional
+ * pins, IO0-IO7, and four open-drain outputs, OC0-OC3.
+ *
+ * It does not follow the usual convention of a register address written
+ * ahead of the data.  Each register is reached through an I2C address of
+ * its own and every access carries a single data byte:
+ *
+ *   0x24  write  System parameter register
+ *   0x23  write  OC0-OC3 output register
+ *   0x38  write  IO0-IO7 output register
+ *   0x26  read   IO0-IO7 input register
+ *
+ * None of the write-only registers can be read back, so the driver keeps a
+ * shadow copy of each and updates it in step with the device.
+ *
+ * IO0-IO7 do not have individual direction control.  A single bit of the
+ * system parameter register, IO_OE, drives the whole group.  The driver
+ * records the direction requested for each pin and puts the group in output
+ * mode when at least one of them is an output, which is what a board that
+ * mixes the two would expect of the pins it drives.  Reading a pin of a
+ * group held in output mode returns the shadowed output value rather than
+ * the level on the pin, because the hardware cannot report it.
+ */
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <debug.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#include <nuttx/kmalloc.h>
+#include <nuttx/mutex.h>
+#include <nuttx/i2c/i2c_master.h>
+#include <nuttx/ioexpander/ioexpander.h>
+#include <nuttx/ioexpander/ch422g.h>
+
+#if defined(CONFIG_IOEXPANDER) && defined(CONFIG_IOEXPANDER_CH422G)

Review Comment:
   remove the check



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to